watchify icon indicating copy to clipboard operation
watchify copied to clipboard

Watchify failing with reactify

Open eyscode opened this issue 11 years ago • 7 comments

I'm using browserify, watchify and reactify in a project, browserify runs perfect, but watchify is failing, I think could be a problem of reactify or watchify, I'm reporting the issue here and reactify github, the watcher is initiated by npm start in package.json as follows:

{...
  "scripts": {
    "start": "watchify -o js/bundle.js -v -d js/app.js",
    "build": "browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js",
    "test": "jest"
  },
  "browserify": {
    "transform": [
      "reactify",
      "envify"
    ],
...}

Terminal output:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: watch ENOSPC
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at createFsWatchInstance (/miranda_frontend/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/miranda_frontend/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:80:19)
    at EventEmitter.NodeFsHandler._watchWithNodeFs (/miranda_frontend/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at EventEmitter.NodeFsHandler._handleFile (/miranda_frontend/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at EventEmitter.<anonymous> (/miranda_frontend/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:468:21)
    at Object.oncomplete (fs.js:107:15)

eyscode avatar Apr 12 '15 20:04 eyscode

$ man errno | grep ENOSPC
       ENOSPC          No space left on device (POSIX.1)

Make sure you have enough free space left on your disk?

ghost avatar Apr 12 '15 21:04 ghost

That's weird because I have a lot of space on my disk.

eyscode avatar Apr 12 '15 21:04 eyscode

@eyscode Weird - looks like a pretty vanilla build. Got anything I can test?

zertosh avatar Apr 12 '15 22:04 zertosh

Don't worry. Now, it works perfect, and I didn't do anything, just restarted the computer. I think my PC became crazy for a moment. Whatever, thanks for the help! :+1:

eyscode avatar Apr 13 '15 03:04 eyscode

Same issue. only solution is to restart .. and i have a lot of space on my disk

aakrem avatar Jul 02 '15 10:07 aakrem

Chiming in to say I have run out of disk space multiple times during development. Very odd since I have lots of space on disk. Only noticed this is Yosemite. Also there are a lot of other factors that might be the root cause for me (eg Photoshop, Chrome).

Quitting terminal and killing finder usually brings my disk space back up.

mattdesl avatar Jul 02 '15 13:07 mattdesl

I had the same issue. Seemed that in my case the error was caused by inotify, it used to many handles .

Use lsof | awk '{ print $2; }' | sort -rn | uniq -c | sort -rn | head

to check which processes are eating up your handles.

blablaenzo avatar Oct 14 '16 08:10 blablaenzo