Reputation: 147
I have been shifting between node versions 10.17.0 and 16.14.0(the latest version) since I work with SharePoint Framework which only supports node version 10.x.x. Now I have shifted back to the latest node version but when trying to run any of my React apps with the command npm start, I am facing with this error:
I have tried everything like uninstalling and reinstalling node on my computer, removing node_modules and package-lock.json files and doing npm install command but still get the error when trying to run my app with npm start.
Same problem applies whether I run npm start in windows cmd or Visual Studio Codes terminal.
Do you guys have any suggestion on what I should do? Thanks in advance.
EDIT: I have tried everything like as Abbas Hussain said and also uninstalling and reinstalling Node but I am still facing this error.
Upvotes: 3
Views: 2762
Reputation: 147
I managed to solve it. There was a problem with the bash file so I did this in cmd:
npm config set script-shell "C:\Program Files\Git\bin\bash.exe"
And reinstalled node and npm so after that it worked fine!
Upvotes: 0
Reputation: 1395
I think I have faced a similar issue before the step that I follow
/node_modules
package-lock.json
or yarn-lock.json
npm cache clean --force
or yarn cache clean
npm install
or yarn
Hope this will resolve your issue
Upvotes: -1