1

I want to use Angular2 so I started tutorial from official website https://angular.io/docs/ts/latest/quickstart.html

I just copy past the code And at the end I run commands :

$ npm install -> ok

$ npm start

> myapp-front@1.0.0 start /home/pln/dev/myprojects/myprojects/myapp-front
> concurrent "npm run tsc:w" "npm run lite" 

[0] 
[0] > myapp-front@1.0.0 tsc:w /home/pln/dev/myprojects/myprojects/myapp-front
[0] > tsc -w
[0] 
[1] 
[1] > myapp-front@1.0.0 lite /home/pln/dev/myprojects/myprojects/myapp-front
[1] > lite-server
[1] 
[1] [BS] Access URLs:
[1]  -------------------------------------
[1]        Local: http://localhost:3000
[1]     External: http://192.168.0.47:3000
[1]  -------------------------------------
[1]           UI: http://localhost:3001
[1]  UI External: http://192.168.0.47:3001
[1]  -------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files...
[0] 09:04:01 - Compilation complete. Watching for file changes.
[1] [BS] File changed: app/app.component.js
[1] [BS] File changed: app/boot.js
[1] events.js:85
[1]       throw er; // Unhandled 'error' event
[1]             ^
[1] Error: watch ENOSPC
[1]     at exports._errnoException (util.js:746:11)
[1]     at FSWatcher.start (fs.js:1172:11)
[1]     at Object.fs.watch (fs.js:1198:11)
[1]     at createFsWatchInstance (/home/pln/dev/myprojects/myprojects/myapp-front/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[1]     at setFsWatchListener (/home/pln/dev/myprojects/myprojects/myapp-front/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[1]     at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/pln/dev/myprojects/myprojects/myapp-front/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[1]     at FSWatcher.NodeFsHandler._handleFile (/home/pln/dev/myprojects/myprojects/myapp-front/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[1]     at FSWatcher.<anonymous> (/home/pln/dev/myprojects/myprojects/myapp-front/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[1]     at FSReqWrap.oncomplete (fs.js:95:15)
[1] 
[1] npm
[1]  
[1] ERR!
[1]  Linux 3.16.0-56-generic
[1] npm
[1]  ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "lite"
[1] npm ERR! node
[1]  v0.12.9
[1] npm ERR! npm 
[1]  v2.14.9
[1] npm
[1]  ERR! code ELIFECYCLE
[1] npm 
[1] ERR! myapp-front@1.0.0 lite: `lite-server`
[1] npm 
[1] ERR! Exit status 1
[1] npm
[1]  ERR! 
[1] npm
[1]  ERR!
[1]  Failed at the myapp-front@1.0.0 lite script 'lite-server'.
[1] npm ERR! This is most likely a problem with the myapp-front package,
[1] npm ERR! not with npm itself.
[1] npm ERR! Tell the author that this fails on your system:
[1] npm ERR!     lite-server
[1] npm ERR! You can get their info via:
[1] npm ERR!     npm owner ls myapp-front
[1] npm ERR!
[1]  There is likely additional logging output above.
[1] 
[1] npm ERR! Please include the following file with any support request:
[1] npm 
[1] ERR!     /home/pln/dev/myprojects/myprojects/myapp-front/npm-debug.log
[1] npm run lite exited with code 1

What can I do ?

Maryo
  • 483
  • 2
  • 13
  • 25

3 Answers3

3

Well, a quick Google will lead you here, or any number of other places that will tell you that ENOSPC means that there is not enough space to install what you're trying to install on the drive you're trying to install it to.... so free some space and run it again.

Community
  • 1
  • 1
drew moore
  • 31,565
  • 17
  • 75
  • 112
1

Refer the below code to avoid ENOSPC

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

Do npm clean. Then do npm install, npm start.

Adrian10 BEN
  • 1,283
  • 2
  • 11
  • 15