question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

after create-react-app failed to start script

See original GitHub issue

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes. Node Version - v11.2.0 NPM Version - 6.4.1

Environment

System: OS: macOS High Sierra 10.13.3 CPU: x64 Intel® Core™ i7-3635QM CPU @ 2.40GHz Binaries: Node: 11.2.0 - /usr/local/bin/node npm: 6.4.1 - ~/.npm-packages/bin/npm Browsers: Chrome: 70.0.3538.110 Firefox: 62.0.3 Safari: 11.0.3 npmPackages: react: ^16.6.3 => 16.6.3 react-dom: ^16.6.3 => 16.6.3 react-scripts: 2.1.1 => 2.1.1 npmGlobalPackages: create-react-app: 2.1.1

Steps to Reproduce

  1. npx create-react-app my-app
  2. npm start

Expected Behavior

It should start the development environment and start the application.

Actual Behavior

Failed at the start script and didn’t run nothing.

image

The complete log about what happened:

0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/Cellar/node/11.2.0/bin/node’, 1 verbose cli ‘/Users/Lucas/.npm-packages/bin/npm’, 1 verbose cli ‘start’ ] 2 info using npm@6.4.1 3 info using node@v11.2.0 4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ] 5 info lifecycle my-app@0.1.0~prestart: my-app@0.1.0 6 info lifecycle my-app@0.1.0~start: my-app@0.1.0 7 verbose lifecycle my-app@0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle my-app@0.1.0~start: PATH: /Users/Lucas/.npm-packages/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/Lucas/Desktop/Gestor Jump Park/react/my-app/node_modules/.bin:/usr/local/opt/node@6/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/opt/local/bin:/opt/local/sbin:/Users/Lucas/.npm-packages/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/Lucas/Library/Android/sdk/tools:/Users/Lucas/Library/Android/sdk/platform-tools 9 verbose lifecycle my-app@0.1.0~start: CWD: /Users/Lucas/Desktop/Gestor Jump Park/react/my-app 10 silly lifecycle my-app@0.1.0~start: Args: [ ‘-c’, ‘react-scripts start’ ] 11 silly lifecycle my-app@0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle my-app@0.1.0~start: Failed to exec start script 13 verbose stack Error: my-app@0.1.0 start: react-scripts start 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/Users/Lucas/.npm-packages/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess.<anonymous> (/Users/Lucas/.npm-packages/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:978:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5) 14 verbose pkgid my-app@0.1.0 15 verbose cwd /Users/Lucas/Desktop/Gestor Jump Park/react/my-app 16 verbose Darwin 17.4.0 17 verbose argv “/usr/local/Cellar/node/11.2.0/bin/node” “/Users/Lucas/.npm-packages/bin/npm” “start” 18 verbose node v11.2.0 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error my-app@0.1.0 start: react-scripts start 22 error Exit status 1 23 error Failed at the my-app@0.1.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
afonsolopezcommented, Nov 28, 2018

Same error here, I’m using Ubuntu 18.04.

I’ve found two ways to fix that.FYI every time I restart my computer, this error occurs, somehow if I simply delete the node_modules folder and install again solves the problem, the error message persists, so, It forces me to completely delete NPM and NODE from my computer and re-install again to work properly.

It’s very annoying I hope they find some fix soon, I’ve seen more people around the internet having the exact same issue.

1reaction
rooseveltAIcommented, Nov 24, 2018

Hmmmmmm, okay try cleaning the cache: npm cache clean --force

after that run this: create-react-app appname --save-exact and try again.

if that doesn’t work, then I think it’s something to look into.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - npm start error with create-react-app - Stack Overflow
Go to your C:\Users\<USER>\AppData\Roaming · Delete npm and npm-cache directories... · Go back to your application directory and remove ...
Read more >
'Npm start' fails on react-scripts-start · Issue #9594 - GitHub
I have 4 projects bootstrapped using create-react-app. One of the projects is working ... Failed at the client@0.1.0 start script. npm ERR!
Read more >
Fixing 'react-scripts' is not recognized error - Nathan Sebhastian
To fix this kind of error, first check on your package. json file and see if react-scripts is listed as one of the...
Read more >
Everything you need to know about react-scripts
First, create a new React app with the following command to find ... it fails to start the server in the form of...
Read more >
Fix: React Scripts Command not Found Error | by Zack West
Fix: React Scripts Command not Found Error · Quick Intro: React Apps Setup 101 · The Problem: Running a React-Scripts Command · Fix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found