after create-react-app failed to start script
See original GitHub issueIs 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
- npx create-react-app my-app
- 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.
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:
- Created 5 years ago
- Comments:7 (1 by maintainers)
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.
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.