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.

'Npm start' fails on react-scripts-start initial attempt

See original GitHub issue


npm start is failing to work with create-react-app after initial ‘create-react-app my-app’ install. Complete output log is below.

I get similar output when trying to run another create-react-app that I copied in from another machine.

I initially tried this with node v8.9.4 and npm v5.6.0 and got the errors below.

I then installed a different node version using ‘npm install -g npm@4’, removed node_modules, cleared the cache, and ran another ‘npm install’.

I then tried npm start with node v8.9.4 and npm v4.6.1, and got the same errors.

I searched for ‘Exit status’ and ‘react-scripts start’ in the documentation but didn’t come up with anything.

running ‘npm ls react-scripts’ yields ’ 'react-scripts@1.0.17 ’

I’m using bash shell on Windows 10, and the latest version of Google Chrome.


capndavet@PC102:/mnt/c/Users/dthompson/Documents/protest-app$ npm start
> protest-app@0.1.0 start /mnt/c/Users/dthompson/Documents/protest-app
> react-scripts start
  const interfaceAddresses = getInterfaceAddresses();                                                                                                ^     
Error: EINVAL: invalid argument, uv_interface_addresses
  at Object.networkInterfaces (os.js:126:30)
  at Function.address.interface (/mnt/c/Users/dthompson/Documents/protest-app/node_modules/address/lib/address.js:58:23)  
  at Function.address.ip (/mnt/c/Users/dthompson/Documents/protest-app/node_modules/address/lib/address.js:97:31)
  at err (/mnt/c/Users/dthompson/Documents/protest-app/node_modules/detect-port-alt/lib/detect-port.js:75:30)
  at Server.server.listen (/mnt/c/Users/dthompson/Documents/protest-app/node_modules/detect-port-alt/lib/detect-port.js:100:12)
  at Object.onceWrapper (events.js:313:30)
  at emitNone (events.js:106:13)
  at Server.emit (events.js:208:7)
  at emitListeningNT (net.js:1378:10)
  at _combinedTickCallback (internal/process/next_tick.js:135:11)
  at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! errno 1
npm ERR! protest-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protest-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.                                                                                                                                              npm ERR! A complete log of this run can be found in:
npm ERR!     /home/capndavet/.npm/_logs/2018-01-04T16_27_50_082Z-debug.log `


capndavet@PC102:/mnt/c/Users/dthompson/Documents$ cat /home/capndavet/.npm/_logs/2018-01-04T16_39_14_234Z-debug.log
 0 info it worked if it ends with ok
1 verbose cli [ '/home/capndavet/.nvm/versions/node/v8.9.4/bin/node',
1 verbose cli   '/home/capndavet/.nvm/versions/node/v8.9.4/bin/npm', 
1 verbose cli   'start' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle protest-app@0.1.0~prestart: protest-app@0.1.0
6 info lifecycle protest-app@0.1.0~start: protest-app@0.1.0
7 verbose lifecycle protest-app@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle protest-app@0.1.0~start: PATH: /home/capndavet/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/c/Users/dthompson/Documents/protest-app/node_modules/.bin:/home/capndavet/.nvm/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle protest-app@0.1.0~start: CWD: /mnt/c/Users/dthompson/Documents/protest-app                          10 silly lifecycle protest-app@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle protest-app@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle protest-app@0.1.0~start: Failed to exec start script
13 verbose stack Error: protest-app@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/capndavet/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/home/capndavet/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)                           14 verbose pkgid protest-app@0.1.0
15 verbose cwd /mnt/c/Users/dthompson/Documents/protest-app                                                             16 verbose Linux 3.4.0+
17 verbose argv "/home/capndavet/.nvm/versions/node/v8.9.4/bin/node" "/home/capndavet/.nvm/versions/node/v8.9.4/bin/npm" "start"                                                                                                                18 verbose node v8.9.4
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error protest-app@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the protest-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 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

gaearoncommented, Jan 14, 2018

For the original issue, this looks related: Apparently fixed in this update:

I don’t know why a similar problem exists on Linux (per, but per the same report removing node_modules and doing an npm install seems to fix it.

I don’t think there’s anything that needs to be done on our side.

Timercommented, Jan 9, 2018

It looks like a Node bug on this specific users configuration, but we should probably make our fork of detect-port swallow it & emit a warning then return true (since an attempt of binding is better than nothing).

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - npm start error with create-react-app - Stack Overflow
It just means something went wrong when dependencies were installed the first time. I suggest doing these three steps: npm install -g npm@latest ......
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 completely fine. However, with the other three, ...
Read more >
Fixing 'react-scripts' is not recognized error - Nathan Sebhastian
When running React applications with npm start or yarn start , you may encounter an error with react-scripts as follows: 'react-scripts' is ...
Read more >
How to fix npm start not working error in React JS - YouTube
How to solve npm err code enoent error syscall open no such file or directory , npm start not working in react js...
Read more >
[Solved] react-scripts: command not found - ItsJavaScript
If you are trying to run the react project using the npm start command on your terminal, you might have got an error...
Read more >

github_iconTop Related Medium Post

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 Post

No results found

github_iconTop Related Hashnode Post

No results found