Reputation: 730
Here's my remote repo, I made the project with 'create-react-app': https://github.com/mattfrancis888/project_2
Whenever I clone the project and try to launch it with npm start. It gives me:
'react-scripts' is not recognized as an internal or external command, operable program or batch file.'
Why is that? I tried:
doing 'npm i'
npm install react-scripts --save ('react-scripts' is not recognized as an internal or external command)
deleting and cloning the project again.
The project works in my other computer (the desktop where I made the remote repo)
Upvotes: 5
Views: 15069
Reputation:
This should solve the issue;
$ sudo rm -fr node_modules/ package-lock.json
$ sudo npm cache clean --force
$ sudo npm i react-scripts --unsafe-perm
$ sudo npm i --unsafe-perm
If still throws error,
Npm package versions and your environment are conflicting. Only way to fix is installing different versions and trying to find compatible environment to run your app.
Upvotes: 10