pallias
pallias

Reputation: 71

How to fix "Module not found: can't resolve x"

This is for a group project, those with me put up some code on github and I cloned it. Did npm install and ran it with npm start. But this error keeps on coming:

https://i.sstatic.net/QrqIU.png

I've tried to delete the node_modules folder and reinstall it. Tried to do npm install --save react-router-dom.

The package.json file:

...
"history": "^4.9.0",
"node-sass": "^4.11.0",
"react": "^16.8.6",
"react-bootstrap": "^1.0.0-beta.6",
"react-dom": "^16.8.5",
"react-helmet": "^5.2.0",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"react-scripts": "2.1.8",
...

Since the group have already done so much I'd expect to see the progress and not this error message :(

Upvotes: 4

Views: 8199

Answers (2)

pallias
pallias

Reputation: 71

Fixed by finding the module folder in node_modules, deleting it, adding it again with npm install --save and then it worked as it should!

Upvotes: 3

Cyro
Cyro

Reputation: 609

Looks like that the issue is with "history". Try change it's version.

Upvotes: 1

Related Questions