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