Chromebook is basically Linux
Hi, I'm Chris Dawson a dad and writer from Portland, OR, now living in Florida. My book is Building Tools with GitHub from O'Reilly. I'm an inventor, have started several companies and worked for several non-startups like Apple and eBay. I am sometimes available for hire as a consultant or part time contributor.

When running jest react tests on my Chromebook Pixelbook, I saw this:

$ node ./node_modules/.bin/react-scripts test --env=jsdom
Error: ENOSPC: no space left on device, watch '/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app'
    at FSWatcher.start (internal/fs/watchers.js:164:26)
    at Object.watch (fs.js:1232:11)
    at NodeWatcher.watchdir (/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app/node_modules/sane/src/node_watcher.js:150:20)
    at new NodeWatcher (/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app/node_modules/sane/src/node_watcher.js:46:8)
    at createWatcher (/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app/node_modules/jest-haste-map/build/index.js:575:23)
    at Array.map (<anonymous>)
    at HasteMap._watch (/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app/node_modules/jest-haste-map/build/index.js:703:25)
    at _buildPromise._buildFileMap.then.then.hasteMap (/home/chronos/user/Downloads/Projects/blahblahblah-chrome/app/node_modules/jest-haste-map/build/index.js:262:21)

I have plenty of disk space available, that is definitely not the problem.

Running this command fixed it:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

This bumps the number of files you can watch at any given time. The error is incorrectly reported by the react script tool as an issue with disk space, but that is not the case.

The link to the issue and the solution is here:

https://github.com/facebook/jest/issues/3254#issuecomment-297214395

Subscribe to RSS by tags if you only want certain types of posts. Or, subscribe to all posts.
View source to this post
Other interesting things:
<
>
Webiphany.com
https://webiphany.com
1
2
3
4
5
6
7
8
9