当我在离子2项目中使用离子服务时会出现此错误。我该如何解决这个问题?

时间:2017-02-24 11:56:44

标签: angular ionic2

我发现这个错误,我正在使用离子2角度2.每当使用(ionic serve)命令时,我发现了这个错误。 我该如何解决这个问题?

periyasamy@LAP-**5CG6326ZB7** ~/ionic_works $ cd sampleApp/
periyasamy@LAP-5CG6326ZB7 ~/ionic_works/sampleApp $ ionic serve
ionic-hello-world@ ionic:serve /home/periyasamy/ionic_works/sampleApp
ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"

[17:10:26]  ionic-app-scripts 1.1.3 
[17:10:26]  watch started ... 
[17:10:26]  build dev started ... 
[17:10:26]  clean started ... 
[17:10:26]  clean finished in 1 ms 
[17:10:26]  copy started ... 
[17:10:26]  transpile started ... 
[17:10:28]  transpile finished in 2.13 s 
[17:10:28]  preprocess started ... 
[17:10:28]  preprocess finished in less than 1 ms 
[17:10:28]  webpack started ... 
[17:10:28]  copy finished in 2.27 s 
[17:10:34]  webpack finished in 6.23 s 
[17:10:34]  sass started ... 
[17:10:35]  sass finished in 895 ms 
[17:10:35]  postprocess started ... 
[17:10:35]  postprocess finished in less than 1 ms 
[17:10:35]  lint started ... 
[17:10:35]  build dev finished in 9.31 s 
[17:10:35]  **watch failed: watcher error:** 
        /home/periyasamy/ionic_works/sampleApp/home/periyasamy/ionic_works/sampleApp/src/assets/**/*,/home/periyasamy/ionic_works/sampleApp/src/index.html,/home/periyasamy/ionic_works/sampleApp/src/manifest.json,/home/periyasamy/ionic_works/sampleApp/src/service-worker.js,/home/periyasamy/ionic_works/sampleApp/node_modules/ionicons/dist/fonts/**/*,/home/periyasamy/ionic_works/sampleApp/node_modules/ionic-angular/fonts/**/*,/home/periyasamy/ionic_works/sampleApp/node_modules/ionic-angular/polyfills/polyfills.js,/home/periyasamy/ionic_works/sampleApp/node_modules/sw-toolbox/sw-toolbox.js:
        **# Error: watch /home/periyasamy/ionic_works/sampleApp/node_modules/ionicons/dist/fonts ENOSPC** 

[17:10:35]开发服务器正在运行:http://localhost:8100/

[17:10:36] lint在1.19秒完成

  

**** 离子信息 **** periyasamy @ LAP-5CG6326ZB7~ / ionic_works / sampleApp $ ionic info

     

您的系统信息:

     

Cordova CLI:6.5.0 Ionic Framework版本:2.1.0 Ionic CLI版本:    2.2.1 Ionic App Lib版本:2.2.0 Ionic App脚本版本:1.1.3 ios-deploy版本:未安装ios-sim版本:未安装操作系统:   Linux 4.4节点版本:v6.10.0 Xcode版本:未安装

1 个答案:

答案 0 :(得分:0)

如果你的npm已经更新(通过 npm -v 检查它必须高于2.0),那么在终端上运行此命令 -

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