2017-02-20 11 views
0

は、私が使用してLITE-サーバーをインストール:lite-serverの起動時に未処理の「エラー」イベントを防ぐ方法は?

npm install lite-server 

をしかし、それは怒鳴るのメッセージが生成されます。

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 

をそして場合は、実行します。

npm run lite-server 

それは私にこのエラーが発生します

events.js:160 
     throw er; // Unhandled 'error' event 
    ^

Error: watch web_app/node_modules/babel-generator/node_modules/lodash/isObject.js ENOSPC 
    at exports._errnoException (util.js:1022:11) 
    at FSWatcher.start (fs.js:1429:19) 
    at Object.fs.watch (fs.js:1456:11) 
    at createFsWatchInstance (/var/www/html/web_app/node_modules/chokidar/lib/nodefs-handler.js:37:15) 
    at setFsWatchListener (/var/www/html/web_app/node_modules/chokidar/lib/nodefs-handler.js:80:15) 
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/var/www/html/web_app/node_modules/chokidar/lib/nodefs-handler.js:228:14) 
    at FSWatcher.NodeFsHandler._handleFile (/var/www/html/web_app/node_modules/chokidar/lib/nodefs-handler.js:255:21) 
    at FSWatcher.<anonymous> (/var/www/html/web_app/node_modules/chokidar/lib/nodefs-handler.js:473:21) 
    at FSReqWrap.oncomplete (fs.js:123:15) 

私はこれを見つけました:https://github.com/angular/angular-cli/issues/2692、しかし私は私の問題を解決しません。

以前にこの問題に遭遇した人はいますか?どのように解決できますか?

ありがとうございます!

答えて

0

には、いくつかの研究の後、私はthis solutionに出くわした:

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

私はまだ私はこれを行うために必要がある理由がわからないが、それは動作します。 ;)

関連する問題