0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

$ npm run watch時のエラー ~解決済~

Last updated at Posted at 2020-06-28
$ npm run watch

をした際に以下のエラーが発生した。

ERROR in ./src/components/CalendarBoard/index.jsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/yoshidahayata/projects/react/calender-app/front/src/components/CalendarBoard/index.jsx: Unexpected token, expected "," (47:9)

上記を翻訳すると下記の通りです。

ERROR in ./src/components/CalendarBoard/index.jsx
モジュールのビルドに失敗しました(./node_modules/babel-loader/lib/index.js から)。
SyntaxError. /Users/yoshidahayata/projects/react/calender-app/front/src/components/CalendarBoard/index.jsx. 予期せぬトークン、予期せぬ「、」 (47:9)

つまり./src/components/CalendarBoard/index.jsxでエラーが発生している為、見直した。
どうやらコメントアウトが上手く出来ていないために発生したエラーのようです!!

だいぶ解決するのに時間かかりました。
こういった凡ミスはteratailなどで質問しても解決できない可能性があります。
なので、エラー文を”Deeply翻訳”などで英文を翻訳してエラー文を理解することが重要だなと改めて感じました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?