0

I am trying create my first react app and running into issues basically at step 1. I am trying npm start on the default create-react-app install and I am getting the follow error. I have included screenshots showing create-react-app ran successfully but that has not fixed anything. I have included screenshots of it successfully running create-react-app and of me running npm start with no luck. Thanks.

Here is the log file:

18 verbose npm v6.4.1 19 error file sh 20 error code ELIFECYCLE 21 error errno ENOENT 22 error syscall spawn 23 error [email protected] start: react-scripts start 23 error spawn ENOENT 24 error Failed at the [email protected] start script. 24 error This is probably not a problem with npm. There is likely additional logging output above. 25 verbose exit [ 1, true ]

I tried this solution and it did not work for me:

stackoverflow.com/a/42539669/5069226

create-react-app running

npm start failing

11
  • see here stackoverflow.com/a/42539669/5069226 Commented Sep 13, 2018 at 18:07
  • 1
    I tried that and it unfortunately did not fix my issue :( Commented Sep 13, 2018 at 18:11
  • Did you remove package-lock.json before doing npm install? Commented Sep 13, 2018 at 18:12
  • I did not..should I have? Commented Sep 13, 2018 at 18:20
  • Could you run tail -n 1000 /Users/Neil/.npm/_logs/<that long filename from the error screenshot>.log and add that to the post please. Please copy and paste from the console, because it is easier for us to work with. Commented Sep 13, 2018 at 18:23

1 Answer 1

1

Looks like this has to do with your workspace path.

I tried to replicate this on my machine with the path /tmp/Users/Neil/Desktop/Complete Web Developer/Section 18_React:Redux/robofriends, and i was able to reproduce your error.

╭─  /tmp/Users/Neil/Desktop/Complete Web Developer/Section 
18_React:Redux/robofriends 
╰ yarn start                                                                                                                                                                                                     K8S: tools    11:37:33
yarn run v1.7.0
$ react-scripts start
/bin/sh: react-scripts: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

But when i moved the robofriends directory up higher in the tree, it worked fine.

╭─  /tmp/Users/robofriends 
╰ yarn start                                                                                                                                                                                             K8S: tools  INT(-2) ↵  11:38:34
yarn run v1.7.0
Starting the development server...

I guessed it could be either the long path to node modules or the non-alphanum characters you have in your path, :,_. So i went back down to the React:Redux directory and renamed it to ...React_Redux and tried npm start again in /tmp/Users/Neil/Desktop/Complete Web Developer/Section 18_React_Redux/robofriends`, and it worked just fine :)

So looks like npm doesn't like the : in the executable path.

Sign up to request clarification or add additional context in comments.

3 Comments

I suspected it was something like that! Well done :-)
I am trying it as we speak
this was it!!! thank you sir :) I was literally on the first video of a react course and so bummed I couldn't even get this much working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.