简体   繁体   English

模块构建失败(来自 ./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'

I'm getting this error when I try to run my app, I'm using all the same dependencies that I always use so I'm very baffled by this.当我尝试运行我的应用程序时出现此错误,我使用了我一直使用的所有相同的依赖项,所以我对此感到非常困惑。 I've tried deleting my package-lock.json and node modules a couple of times and tried searching the whole repo for /src/data and found nothing.我试过删除我的 package-lock.json 和 node 模块几次,并尝试在整个 repo 中搜索 /src/data 并没有找到任何东西。

More of the error message:更多错误信息:

ERROR in ./src/index.js ./src/index.js 中的错误

Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module './src/data'模块构建失败(来自 ./node_modules/babel-loader/lib/index.js):错误:找不到模块“./src/data”

and this is the ./src/index.js from the error这是错误中的 ./src/index.js

import { render } from 'react-dom';
import { Provider } from 'react-redux';
import App from './components/App';
import store from './store';

render(
  <Provider store={store}>
    <App />
  </Provider>, 
  document.getElementById('root')
);```

Anyone have any recommendations?

Apparently there's a problem with a live version of core-js-compat dependency.显然, core-js-compat依赖项的实时版本存在问题。 For a quick fix, you can update your package.json using为了快速修复,您可以使用更新您的package.json

"core-js-compat": "^3.4.7"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 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' 错误 in./src/index.js 模块构建失败(来自./node_modules/babel-loader/lib/index.js): - ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): 错误:模块构建失败(来自 ./node_modules/babel-loader/lib/index.js):语法错误: - Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: 未捕获的错误:模块构建失败(来自./node_modules/babel-loader/lib/index.js) - Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js) 模块构建失败(来自./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' 模块构建失败(来自 ./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)Vue Js - Module build failed (from ./node_modules/babel-loader/lib/index.js) Vue Js 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js) - Module build failed (from ./node_modules/babel-loader/lib/index.js) 模块构建失败(来自./node_modules/babel-loader/lib/index.js): - Module build failed (from ./node_modules/babel-loader/lib/index.js): 反应构建错误:模块构建失败(来自 ./node_modules/babel-loader/lib/index.js): - React build error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM