./node_modules/react-dom/cjs/react-dom.development.js
Module not found: Can't resolve 'schedule' in 'C:\Users\adcal\dvmtn7\myapp\node_modules\react-dom\cjs'
同一错误连续发生了三个create-react-apps。它首先起作用,然后随机中断。
我仅通过npm安装了模块。这是package.json
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"dotenv": "^6.0.0",
"express": "^4.16.3",
"express-session": "^1.15.6",
"massive": "^5.3.0",
"react": "^16.5.0",
"react-dom": "^16.5.0",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.5",
"redux": "^4.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
更新:我在项目节点模块文件夹中安装了“时间表” npm。为什么它仍然引发此错误? (现在我的所有项目中都发生这种情况。)
更新为更新:我在全局范围内重新安装了create-react-app。
答案 0 :(得分:0)
我认为此错误的原因是安装或更新模块时出现了问题。
我通过以下方式解决了这个问题。
develop
命令以重新安装软件包。npm install
命令以确认错误已解决。