Angular2快速启动错误

Angular2快速启动错误,angular,Angular,我想使用Angular2,所以我从官方网站开始了教程 我只是复制过去的代码 最后,我运行命令: $npm安装 ->嗯 $npm开始 > 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/myproj

我想使用Angular2,所以我从官方网站开始了教程

我只是复制过去的代码 最后,我运行命令:

$npm安装 ->嗯

$npm开始

> 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
>myapp-front@1.0.0启动/主页/pln/dev/myprojects/myprojects/myapp前端
>并发“npm运行tsc:w”“npm运行lite”
[0] 
[0]>myapp-front@1.0.0tsc:w/home/pln/dev/myprojects/myprojects/myapp front
[0]>tsc-w
[0] 
[1] 
[1] >myapp-front@1.0.0lite/home/pln/dev/myprojects/myprojects/myapp front
[1] >lite服务器
[1] 
[1] [BS]访问URL:
[1]  -------------------------------------
[1] 本地:http://localhost:3000
[1] 外部:http://192.168.0.47:3000
[1]  -------------------------------------
[1] 用户界面:http://localhost:3001
[1] 用户界面外部:http://192.168.0.47:3001
[1]  -------------------------------------
[1] [BS]从以下位置提供文件服务:/
[1] [BS]正在查看文件。。。
[0]09:04:01-编译完成。监视文件更改。
[1] [BS]文件已更改:app/app.component.js
[1] [BS]文件已更改:app/boot.js
[1] events.js:85
[1] 投掷者;//未处理的“错误”事件
[1]             ^
[1] 错误:观看电脑
[1] 导出时出现异常(util.js:746:11)
[1] 在FSWatcher.start(fs.js:1172:11)
[1] 在Object.fs.watch(fs.js:1198:11)
[1] 在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] 在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] 在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] 在FSWatcher.NodeFsHandler.u 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] 在FSWatcher。(/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] 在FSReqWrap.oncomplete(fs.js:95:15)
[1] 
[1] npm
[1]  
[1] 呃!
[1] Linux 3.16.0-56-generic
[1] npm
[1] 呃!argv“/usr/bin/node”“/usr/bin/npm”“运行”“精简”
[1] npm错误!节点
[1] v0.12.9
[1] npm错误!npm
[1] v2.14.9
[1] npm
[1] 呃!代码失效循环
[1] npm
[1] 呃!myapp-front@1.0.0lite:`lite服务器`
[1] npm
[1] 呃!退出状态1
[1] npm
[1] 呃!
[1] npm
[1] 呃!
[1] 在myapp上失败-front@1.0.0lite脚本“lite服务器”。
[1] npm错误!这很可能是myapp前端软件包的问题,
[1] npm错误!与npm本身无关。
[1] npm错误!告诉作者此操作在您的系统上失败:
[1] npm错误!lite服务器
[1] npm错误!您可以通过以下方式获取他们的信息:
[1] npm错误!npm所有者ls myapp前端
[1] npm错误!
[1] 上面可能还有其他日志输出。
[1] 
[1] npm错误!请在任何支持请求中包括以下文件:
[1] npm
[1] 呃/主页/pln/dev/myprojects/myprojects/myapp-front/npm-debug.log
[1] npm运行lite已退出,代码为1

我能做什么?

好吧,一个快速的谷歌会引导你,或者任何其他地方都会告诉你,
ENOSPC
意味着没有足够的空间在你试图安装的驱动器上安装你想要安装的东西。。。。因此,请释放一些空间并再次运行它

好吧,一个快速的谷歌会引导你,或者任何其他地方会告诉你,
ENOSPC
意味着没有足够的空间在你试图安装的驱动器上安装你想要安装的东西。。。。因此,请释放一些空间并再次运行它

进行npm清洁。然后进行npm安装,npm启动。

进行npm清洁。然后进行npm安装,npm启动。

请参考以下代码以避免ENOSPC

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

请参阅下面的代码以避免出现问题

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

它可以工作:echo fs.inotify.max_user_watches=524288 | sudo tee-a/etc/sysctl.conf&&sudo sysctl-p@Maryo这对我也起了作用。它到底起什么作用?它起作用:echo fs.inotify.max_user_watches=524288 | sudo tee-a/etc/sysctl.conf&&sudo sysctl-p@Maryo这对我来说也很管用。那到底有什么用呢?