0

I have a problem running npm start from my newly created project, the thing is the problem doesn't seem to occur outside of this folder (its a git repo, so it needs to be in here). If i create a new project in another folder and run npm start I have no issues at all.

So I recently started working in Ubuntu 18.04LTS, gone through all the setup of installing nodejs and npm.

Currently running versions:

node = 10.16.0

npm = 6.9.2

So I created my app by using npx create-react-app

When i run npm start inside this, it throws me an error:

sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! frontend@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the frontend@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely 
additional logging output above.

I tried create the app in another folder, testing if i can run npm start (yes) and the move this app to my repo, but then it fails again.

1 Answers1

0

If i understand well what you wrote, "npm start" worked fine when you changed folders. If this is the case, you should know that Node has issues reading the path when some particular characters (like "&") or spaces are in the name of a folder. Try to change the folder's name.

GuilloteL
  • 112
  • 1
  • 5