Closed3
【npmエラー】Failed to load parser 'babel-eslint' declared in 'package.json » eslint-config-react-app

このリポジトリにtypoの報告があったので修正しようとしたら、npm run build
でコケる
エラーログ
Failed to load parser 'babel-eslint' declared in 'package.json » eslint-config-react-app » /home/Netflix-clone/node_modules/eslint-config-react-app/base.js': Cannot find module 'babel-eslint'

yarn add eslint --save-dev
してみる。
再度npm run build
チャレンジ!
エラー!!es-lintの依存関係が悪いらしい。
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /Users/fujisawakazuki/Desktop/sample/Netflix-clone/node_modules/eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
この手順に従ってnode_modulesを再インストール!
見事解決!

結論
babel-eslint
の依存関係が原因。
node_modulesの再インストールで解決。
このスクラップは2022/01/30にクローズされました