Gatsby: error UNHANDLED EXCEPTION

Created on 3 Jan 2018  Â·  8Comments  Â·  Source: gatsbyjs/gatsby

Description

I am a newbie to gatsby.
Basically, I am just following your guides on https://www.npmjs.com/package/gatsby-cli

Environment

Gatsby version:1.1.28
Node.js version:v8.7.0
Operating System:Ubuntu 17.04

File contents (if changed): (There is no change)

gatsby-config.js:
package.json:
gatsby-node.js:
gatsby-browser.js:
gatsby-ssr.js:

Actual result

What happened.
Whenever I type "gatsby develop" it returns
error UNHANDLED EXCEPTION

  Error: watch /home/dev/gatsby-site/gatsby-config.js ENOSPC

  - nodefs-handler.js:37 createFsWatchInstance
    [gatsby-site]/[chokidar]/lib/nodefs-handler.js:37:15

  - nodefs-handler.js:80 setFsWatchListener
    [gatsby-site]/[chokidar]/lib/nodefs-handler.js:80:15

  - nodefs-handler.js:228 FSWatcher.NodeFsHandler._watchWithNodeFs
    [gatsby-site]/[chokidar]/lib/nodefs-handler.js:228:14

  - nodefs-handler.js:255 FSWatcher.NodeFsHandler._handleFile
    [gatsby-site]/[chokidar]/lib/nodefs-handler.js:255:21

  - nodefs-handler.js:473 FSWatcher.<anonymous>
    [gatsby-site]/[chokidar]/lib/nodefs-handler.js:473:21

Steps to reproduce

1.gatsby new gatsby-site

2.gatsby develop
...

Most helpful comment

I ran into this error using Netlify and simply redeployed with the clear cache option set to yes. https://screencast.com/t/p5AviESgg

All 8 comments

This is a node.js error not a gatsby error. See this stackoverflow question for example https://stackoverflow.com/questions/22475849/node-js-error-enospc

By the way, running console/bash as administrator solved my issue under Windows 10.

@sparker888 I'm using fedora, that worked for me too. https://xkcd.com/149/

I ran into this error using Netlify and simply redeployed with the clear cache option set to yes. https://screencast.com/t/p5AviESgg

This is a node.js error not a gatsby error. See this stackoverflow question for example https://stackoverflow.com/questions/22475849/node-js-error-enospc

worked

gatsby develop -------> problem solve by running this
(echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p)

gatsby develop -------> problem solve by running this
(echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p)

This worked, thanks.

Thanks. @KyleAMathews
This worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

kalinchernev picture kalinchernev  Â·  3Comments

KyleAMathews picture KyleAMathews  Â·  3Comments

hobochild picture hobochild  Â·  3Comments

timbrandin picture timbrandin  Â·  3Comments