Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start fails to execute #4227

Closed
Karadjordje opened this issue Mar 29, 2018 · 4 comments
Closed

npm start fails to execute #4227

Karadjordje opened this issue Mar 29, 2018 · 4 comments

Comments

@Karadjordje
Copy link

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

  1. node -v: 9.9.0
  2. npm -v: 5.8.0
  3. yarn --version (if you use Yarn):
  4. npm ls react-scripts : 1.1.1

Then, specify:

  1. Operating system: Linux Ubuntu 16.04
  2. Browser and version (if relevant): Chrome Version 65.0.3325.181

Steps to Reproduce

(Write your steps here:)

  1. npx create-react-app moj-test
  2. cd moj-test
  3. npm start
    Thats where the error starts.

Expected Behavior

(Write what you thought would happen.)

Starting server and opening app in chrome.

Actual Behavior

Initial error:

Starting the development server...

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

Error: watch /home/karadjordje/Desktop/react-practice/moj-test/public ENOSPC
    at FSWatcher.start (fs.js:1409:19)
    at Object.fs.watch (fs.js:1435:11)
    at createFsWatchInstance (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:171:5)
Emitted 'error' event at:
    at FSWatcher._handleError (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/index.js:257:10)
    at createFsWatchInstance (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:39:5)
    at setFsWatchListener (/home/karadjordje/Desktop/react-practice/moj-test/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    [... lines matching original stack trace ...]
    at FSReqWrap.oncomplete (fs.js:171:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! moj-test@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the moj-test@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/karadjordje/.npm/_logs/2018-03-29T20_27_30_763Z-debug.log

Debug log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@5.8.0
3 info using node@v9.9.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle moj-test@0.1.0~prestart: moj-test@0.1.0
6 info lifecycle moj-test@0.1.0~start: moj-test@0.1.0
7 verbose lifecycle moj-test@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle moj-test@0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/karadjordje/Desktop/react-practice/moj-test/node_modules/.bin:/home/karadjordje/bin:/home/karadjordje/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle moj-test@0.1.0~start: CWD: /home/karadjordje/Desktop/react-practice/moj-test
10 silly lifecycle moj-test@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle moj-test@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle moj-test@0.1.0~start: Failed to exec start script
13 verbose stack Error: moj-test@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack     at EventEmitter.emit (events.js:180:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:180:13)
13 verbose stack     at maybeClose (internal/child_process.js:936:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid moj-test@0.1.0
15 verbose cwd /home/karadjordje/Desktop/react-practice/moj-test
16 verbose Linux 4.13.0-37-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v9.9.0
19 verbose npm  v5.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error moj-test@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the moj-test@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 ]

Things I've tried so far:

  1. Switch to an 5.6.0 npm version. Tried everything from scratch. Didn't work.
  2. Deleted node_modules and package-lock.json then run npm install. Didn't work.
  3. Cleared cache with npm cache clean -f. Didn't work.
  4. Intalled create-react-app globally with npm i -g create-react-app. Made project with create-react-app my-test. Didn't work.
    I have tried some other things.
    Also I have this problems with my older projects now that were working literally yesterday.

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@daliborgogic
Copy link

ENOSPC means that there is no space on the drive

@daliborgogic
Copy link

If drive is not full then try:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

@Karadjordje
Copy link
Author

@daliborgogic
Thanks after using command you gave me everything works fine now.

@deekode
Copy link

deekode commented Aug 29, 2018

@daliborgogic you have just saved me from depression!!! Thank you so much!!!!!!!!

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants