LoginSignup
0
2

More than 3 years have passed since last update.

[解決]Vueで、2つエラー""./src/main.js Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js): と、Error: Cannot find module 'eslint/lib/formatters/stylish' Require stack:""

Last updated at Posted at 2020-12-03

背景

vue(vue CLI)で

$ vue add axios

をした時に、compileエラーが出た。(タイトルに書いてあるエラー。)

解決方法

package.jsonをこのように変更

"resolutions": {
- "eslint-loader": 2.1.2” ←削除
+ "eslint-loader": "3.0.3" ←追加
}

その後


$ yarn add -D eslint-loader

僕の場合は、Dockerを使っていたので、コンテナを起動し直す。

エラー解消

参考:
https://tmegos.hatenablog.jp/entry/package-json-dependencies-caret

0
2
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
2