[英]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.我正在运行这个反应应用程序,然后我运行 npm 弹出来弹出应用程序,这样我就可以添加 web 包功能。 Now when I run npm or yarn start, it doesn't work.现在当我运行 npm 或 yarn start 时,它不起作用。 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.我仍然不知道错误是什么,因为我没有触及 webpack.config 文件中的任何 babel-loader。 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.当您执行eject
时,React APP 开发依赖项声明(来自内部package.json
文件)和相关配置文件被提升到项目的根目录。 However, previously installed dependencies are left behind.但是,以前安装的依赖项被留下了。
Deleting your node_modules
directory and running yarn install
again will most likely fix the problem.删除你的node_modules
目录并再次运行yarn install
很可能会解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.