Create-react-app: Error on linux when running yarn start

Created on 22 Nov 2017  路  5Comments  路  Source: facebook/create-react-app

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Issue is not related to 4 version

Which terms did you search for in User Guide?

No

Environment

  1. node -v: 8.9.1
  2. npm -v: 5.5.1
  3. yarn --version (if you use Yarn): 1.3.2
  4. npm ls react-scripts (if you haven鈥檛 ejected): 1.0.17

Then, specify:

  1. Operating system: Linux Mint 18.2
  2. Browser and version (if relevant): Not relevant

Steps to Reproduce

  1. create-react-app APP_NAME
  2. cd APP_NAME
  3. run yarn start or npm start

Expected Behavior

will run app and open in browser.

Actual Behavior

  1. opens the browser, but nothing there
  2. Error in console
Starting the development server...

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

Error: watch /home/toshiba/Documents/projects/my-cv/client3/public/favicon.ico ENOSPC
    at _errnoException (util.js:1024:11)
    at FSWatcher.start (fs.js:1374:19)
    at Object.fs.watch (fs.js:1400:11)
    at createFsWatchInstance (/home/toshiba/Documents/projects/my-cv/client3/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/toshiba/Documents/projects/my-cv/client3/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/toshiba/Documents/projects/my-cv/client3/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/toshiba/Documents/projects/my-cv/client3/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/toshiba/Documents/projects/my-cv/client3/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at FSReqWrap.oncomplete (fs.js:153:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Thanks.

question

Most helpful comment

Got the same problem, fixed running with sudo on Ubuntu:
sudo yarn start

All 5 comments

Got the same problem, fixed running with sudo on Ubuntu:
sudo yarn start

Yes, @Mogtofu33 it is a workaround right now. But anyway it is a bug, app should not need root rights to run.

Install node and npm using NVM which can install multiple versions of node and point to any one you like. It installs node in your home directory, hence no sudo rights required as well.
@Talgat-Sar

The current error is a ENOSPC (Not enough space)
It's not directly related to permission but normally to disk usage and when you hit the limit of file you can watch.
As root the limit of watch is probably bigger than a normal use,that's why sudo solve the problem however run an application as root is not desirable.
Try to increase the limit of watchable files
https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959#32600959

Please increase your number of watchers available to your user: https://webpack.github.io/docs/troubleshooting.html#not-enough-watchers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ap13p picture ap13p  路  3Comments

fson picture fson  路  3Comments

adrice727 picture adrice727  路  3Comments

rdamian3 picture rdamian3  路  3Comments

onelson picture onelson  路  3Comments