Reputation: 33
here is the error msg from console:
Error: ENOENT: no such file or directory, open 'C:\Code\django\DRF-REACT\node_modules\prop-types\node_modules\react-is\index.js' at Object.../node_modules/prop-types/node_modules/react-is/index.js (has.js:1:1)
at Object.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at Object.../node_modules/prop-types/index.js (index.js:9:1)
at Object.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at Module.../node_modules/@material-ui/core/esm/AppBar/AppBar.js (log.js:59:1)
at Module.options.factory (react refresh:6:1)
The problem is >react-is is outside of prop-types/node_modules and prop-types/node-modules is an empty folder. I tried to move the react-is into the node modules folder in Vscode but it cannot be done.
Upvotes: 3
Views: 22042
Reputation: 1337
npm clean cache
npm i
npm start
Upvotes: 0
Reputation: 1
close the vs code, close the application and restart both, it works properly.. :) Goes the error...!
Upvotes: 0
Reputation: 19
I only used another (port) and restart my application using command(npm start). after that the problem was solved
Upvotes: 0
Reputation: 65
Simply closing VS Studio and running npm start solved the problem for me.
Upvotes: 0
Reputation: 4254
Following steps resolved the issue in my react application
Closed VS studio
Run the following commands
npm update
npm audit fix
npm start
Upvotes: 3
Reputation: 341
You might have some complications with your node_modules
folder and installing react-is
.
A couple ideas:
npm install react-is
: make sure the package is installed instead of physically moving it.
rm -rf node_modules
: delete node_modules
folder and do a fresh npm install
One or both of these could help if you haven't done them already.
Upvotes: 2