3

Run into this error when using 'npm start test_app' on a newly created application using 'create-react-app'. This problems also shows up on my previously created projects using create-react-app. I've tried updating the node version to v8.9.1 and the npm version to 5.5.1. The problem still persists.

[email protected] start /home/user/test_app react-scripts start

Starting the development server...

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

Error: watch /home/user/test_app/public ENOSPC
    at exports._errnoException (util.js:1012:11)
    at FSWatcher.start (fs.js:1429:19)
    at Object.fs.watch (fs.js:1456:11)
    at createFsWatchInstance (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/user/test_app/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)

npm ERR! Linux 4.4.0-81-generic
npm ERR! argv "/usr/local/nodejs/bin/node" "/usr/local/nodejs/bin/npm" "start"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'react-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the test_app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs test_app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls test_app
npm ERR! There is likely additional logging output above.

I get the following warnings while running 'npm install' after using create-react-app to create the app (This might be relevant since chokidar which throws the error is a wrapper around fs.watch):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2
  • I looked at this again and here are a few more findings: 1) chokidar is a required dependency for create-react-app 2) fsevents is a required dependency for chokidar 3) fsevents is a dependency for Darwin, but doesn't work with Linux. This is why create-react-app doesn't work. I've tried the following but failed to solve this issue: 1) Force install fsevents by adding it in create-react-app dependency and running 'npm install -f' 2) Multiple node and npm versions (Including those mentioned in create-react-app): node: 8.2.1, npm:3.10.8, create-react-app:1.4.3, Commented Dec 17, 2017 at 9:33
  • 1
    I siwtched to these versions: node: 8.2.1, npm: 5.6.0, create-react-app: 1.4.3. I created one new app using create-react-app and managed to succesfully start it. I proceeded to create another and got the same error while trying to start it. I proceeded to randomly start and stop these two apps and one pre-existing app. All these three apps would either start or throw this error seemingly at random. ENOSPC error has to do with memory issues, however, my disk and RAM both appear to have sufficient space. Commented Dec 23, 2017 at 7:35

1 Answer 1

0

The answer is update node version.

nvm install lts/*

I had the same issue, I was working with node 8 (now on 10) since a previous project, it is because of deprecation issues, it is sad to say but old js functions have completely been removed

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.