Create-react-app: Error then start application: npm start events.js:160 throw Unhandled 'error' event

Created on 23 Sep 2017  路  1Comment  路  Source: facebook/create-react-app

Hi, I get error then start application.

Linux mint 18.1 Serena x64
Node -v => v8.5.0
npm -v => 4.6.1

I install create-reaction-app and try to start app the first time.
I get the error:

$ npm start

> [email protected] start /home/user/project-name
> react-scripts start

Starting the development server...

events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/user/project-name/public ENOSPC
    at _errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1383:19)
    at Object.fs.watch (fs.js:1409:11)
    at createFsWatchInstance (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/user/project-name/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:154:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/user/.npm/_logs/2017-09-23T08_13_27_781Z-debug.log

Log file:

0 info it worked if it ends with ok
1 verbose cli [ '/home/user/.nvm/versions/node/v8.5.0/bin/node',
1 verbose cli   '/home/user/.nvm/versions/node/v8.5.0/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /home/user/.nvm/versions/node/v8.5.0/lib/node_modules/npm/bin/node-gyp-bin:/home/user/project-name/node_modules/.bin:/home/user/.nvm/versions/node/v8.5.0/bin:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/apache-maven-3.5.0/bin:/opt/gradle-3.5/bin
10 verbose lifecycle [email protected]~start: CWD: /home/user/project-name
11 silly lifecycle [email protected]~start: Args: [ '-c', 'react-scripts start' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `react-scripts start`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/home/user/.nvm/versions/node/v8.5.0/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at EventEmitter.emit (events.js:213:7)
14 verbose stack     at ChildProcess.<anonymous> (/home/user/.nvm/versions/node/v8.5.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:125:13)
14 verbose stack     at ChildProcess.emit (events.js:213:7)
14 verbose stack     at maybeClose (internal/child_process.js:927:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/user/project-name
17 verbose Linux 4.4.0-91-generic
18 verbose argv "/home/user/.nvm/versions/node/v8.5.0/bin/node" "/home/user/.nvm/versions/node/v8.5.0/bin/npm" "start"
19 verbose node v8.5.0
20 verbose npm  v4.6.1
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `react-scripts start`
23 error Exit status 1
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 check 3000 port with netstat -natp it is clean.
I check npm process with ps aux | grep npm it is not started.
I try "PORT=3005 npm start" and get same error.

Most helpful comment

This is probably an issue in your dev environment and not in the create-react-app. This StackOverflow thread might be helpful.

>All comments

This is probably an issue in your dev environment and not in the create-react-app. This StackOverflow thread might be helpful.

Was this page helpful?
0 / 5 - 0 ratings