Reputation: 185
./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'
this same error has happened three create-react-apps in a row. It works at first and then just randomly breaks.
I have only installed modules via npm. Here's the 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"
}
}
Update: I have the "schedules" npm installed in the projects node module folder. Why is it still throwing this error though? (It happens in all of my projects now.)
Update to the update: I reinstalled create-react-app globally it fixed it.
Upvotes: 3
Views: 6767
Reputation: 612
It appears that schedule
got moved out of react in a later version.
Try
npm install scheduler --save
or updating react
https://www.npmjs.com/package/scheduler
Upvotes: 3
Reputation: 172
I think the reason for this error is that there was a problem installing or updating a module.
I solved the problem in the following ways.
npm install
command to install a package again.yarn start
command to confirm that the error has been resolved.Upvotes: 1