lite-server icon indicating copy to clipboard operation
lite-server copied to clipboard

Unhandled Error Event

Open sils opened this issue 9 years ago • 2 comments
trafficstars

Whenever I try to run lite-server an error gets thrown.

Bug repro steps

  1. npm install -g lite-server
  2. lite-server --version
Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
** browser-sync config **
{ injectChanges: false,
  files: [ './**/*.{html,htm,css,js}' ],
  watchOptions: { ignored: 'node_modules' },
  server: { baseDir: './', middleware: [ [Function], [Function] ] } }
events.js:160
      throw er; // Unhandled 'error' event
      ^

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

Environment

  • lite-server version: probably 2.2.2
  • nodejs version: 6.3.0
  • npm version: 3.10.5
  • OS type/version: Linux/Archlinux updated today

sils avatar Jul 09 '16 11:07 sils

Hm, I was able to clean up stuff with npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm and reinstalling npm and semver via my package manager. Might be a bit brutal but now installing it as a local package:

git clone  https://github.com/angular/quickstart  my-proj
cd my-proj
npm install
lasse@lssteady ~/prog/django-gitmate/angular_test (git)-[master] % npm run lite-server -v
3.10.5
lasse@lssteady ~/prog/django-gitmate/angular_test (git)-[master] % npm run lite -v
3.10.5

which is interesting since the latest version should be 2.2.2, right?

Also running the server still doesn't work: http://pastebin.com/w3nk1LV8

sils avatar Jul 09 '16 11:07 sils

I have the same problem, lite-server is install local save-dev and global.

hjco avatar Dec 29 '16 18:12 hjco