简体   繁体   中英

Cannot find module 'babel-loader' Require stack:

Hope you are all doing well? I'm running this react app and then I ran npm eject to eject the app so I can add the web packs features. Now when I run npm or yarn start, it doesn't work. It then pulls the error as follows.

Cannot find module 'babel-loader'
Require stack:

I still don't know what the error is because I did not touch any babel-loader in the webpack.config file. Anyone know what the error is and how to fix it? Thanks in advance

When you do eject , React APP development dependencies declarations (from internal package.json files) and relative configuration files are hoisted to the root of your project. However, previously installed dependencies are left behind.

Deleting your node_modules directory and running yarn install again will most likely fix the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM