LoginSignup
0
0

More than 5 years have passed since last update.

Gatsby.jsで画像のインポートに失敗した時のメモ

Posted at

現象

このissueと同じ現象が出て、webpackが画像ファイルのインポートに失敗する。

エラーメッセージはこんな感じ(上記issueから抜粋):

Loader D:\Personal\Projects\gatsby\myPage\node_modules\url\url.js?{"limit":10000,"name":"static/[name].[hash:8].[ext]"} didn'tstcss-loader!./src/layouts/index.module.css 6:61-111 return a function

対処法

npm install url-loaderで解決する例もあるみたいですが、原因はnpmっぽいので、yarnでパッケージ入れ直した。

直った。

参考

npm: 5.8.0
yarn: 1.9.4

たぶんそのうち直る問題かもしれませんが、issueがまだopenなので一応。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0