简体   繁体   English

找不到模块 'babel-loader' 需要堆栈:

[英]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.

相关问题 错误:无法解析模块“babel-loader” - Error: Cannot resolve module 'babel-loader' 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js):错误:找不到模块“./src/data” - Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module './src/data' 多应用程序中的错误:将babel升级到v7后无法解析模块“ babel-loader” - Error in multi app: Cannot resolve module 'babel-loader' after upgrading babel to v7 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js):错误:找不到模块“babel-preset-react” - Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react' 模块构建失败(来自./node_modules/babel-loader/lib/index.js):错误:找不到模块'babel-core' - Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-core' 错误 in./src/app.js 模块构建失败(来自./node_modules/babel-loader/lib/index.js):错误:找不到模块'@babel/preset-present-env' - ERROR in ./src/app.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/preset-present-env' 模块解析失败:带有 babel-loader 的意外令牌 (9:37) - Module parse failed: Unexpected token (9:37) with babel-loader ES6模块导入导出与webpack和babel-loader - ES6 module import export with webpack and babel-loader 找不到模块“newman”需要堆栈: - Cannot find module 'newman' Require stack: 为什么在使用babel-loader时Object.assign()需要polyfill? - Why does Object.assign() require a polyfill when babel-loader is being used?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM