问题:在执行命令npm start 是出现下列问题:

npm
[] WARN invalid config loglevel="notice"
[] npm WARN invalid config loglevel="notice"
[]
[] > angular-quickstart@1.0. build:watch /home/gjj/download/worksp/quickstart-master
[] > tsc -p src/ -w
[]
[]
[] > angular-quickstart@1.0. serve /home/gjj/download/worksp/quickstart-master
[] > lite-server -c=bs-config.json
[]
[] fs.js:
[] throw error;
[] ^
[]
[] Error: watch src ENOSPC
[] at exports._errnoException (util.js::)
[] at FSWatcher.start (fs.js::)
[] at Object.fs.watch (fs.js::)
[] at Object.watchDirectory (/home/gjj/download/worksp/quickstart-master/node_modules/_typescript@2.1.@typescript/lib/tsc.js::)
[] at Object.executeCommandLine (/home/gjj/download/worksp/quickstart-master/node_modules/_typescript@2.1.@typescript/lib/tsc.js::)
[] at Object.<anonymous> (/home/gjj/download/worksp/quickstart-master/node_modules/_typescript@2.1.@typescript/lib/tsc.js::)
[] at Module._compile (module.js::)
[] at Object.Module._extensions..js (module.js::)
[] at Module.load (module.js::)
[] at tryModuleLoad (module.js::)
[]
[] npm ERR!
[] Linux 4.10.--generic
[] npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "build:watch"
[] npm ERR! node v6.11.2
[] npm ERR! npm v3.10.10
[] npm ERR! code ELIFECYCLE
[] npm ERR! angular-quickstart@1.0. build:watch: `tsc -p src/ -w`
[] npm ERR! Exit status
[] npm ERR!
[] npm ERR! Failed at the angular-quickstart@1.0. build:watch script 'tsc -p src/ -w'.
[] npm ERR! Make sure you have the latest version of node.js and npm installed.
[] npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
[] npm ERR! not with npm itself.
[] npm ERR! Tell the author that this fails on your system:
[] npm ERR! tsc -p src/ -w
[] npm ERR!
[] You can get information on how to open an issue for this project with:
[] npm ERR! npm bugs angular-quickstart
[] npm ERR! Or if that isn't available, you can get their info via:
[] npm ERR! npm owner ls angular-quickstart
[] npm ERR! There is likely additional logging output above.
[]
[] npm ERR! Please include the following file with any support request:
[] npm ERR! /home/gjj/download/worksp/quickstart-master/npm-debug.log
[] npm run build:watch exited with code
[] ** browser-sync config **
[] { injectChanges: false,
[] files: [ './**/*.{html,htm,css,js}' ],
[] watchOptions: { ignored: 'node_modules' },
[] server:
[] { baseDir: 'src',
[] middleware: [ [Function], [Function] ],
[] routes: { '/node_modules': 'node_modules' } } }
[] events.js:
[] throw er; // Unhandled 'error' event
[] ^
[]
[] Error: watch . ENOSPC
[] at exports._errnoException (util.js::)
[] at FSWatcher.start (fs.js::)
[] at Object.fs.watch (fs.js::)
[] at createFsWatchInstance (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at setFsWatchListener (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at FSWatcher.NodeFsHandler._handleDir (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at FSWatcher.<anonymous> (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at FSWatcher.<anonymous> (/home/gjj/download/worksp/quickstart-master/node_modules/_chokidar@1.7.@chokidar/lib/nodefs-handler.js::)
[] at FSReqWrap.oncomplete (fs.js::)
[]
[] npm ERR! Linux 4.10.--generic
[] npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "serve"
[] npm ERR! node v6.11.2
[] npm ERR! npm v3.10.10
[] npm
[] ERR! code ELIFECYCLE
[] npm ERR! angular-quickstart@1.0. serve: `lite-server -c=bs-config.json`
[] npm ERR! Exit status
[] npm ERR!
[] npm ERR! Failed at the angular-quickstart@1.0. serve script 'lite-server -c=bs-config.json'.
[] npm ERR! Make sure you have the latest version of node.js and npm installed.
[] npm
[] ERR! If you do, this is most likely a problem with the angular-quickstart package,
[] npm ERR! not with npm itself.
[] npm ERR! Tell the author that this fails on your system:
[] npm ERR! lite-server -c=bs-config.json
[] npm
[] ERR! You can get information on how to open an issue for this project with:
[] npm ERR! npm bugs angular-quickstart
[] npm ERR! Or if that isn't available, you can get their info via:
[] npm ERR! npm owner ls angular-quickstart
[] npm ERR! There is likely additional logging output above.
[]
[] npm ERR! Please include the following file with any support request:
[] npm ERR! /home/gjj/download/worksp/quickstart-master/npm-debug.log
[] npm run serve exited with code
npm ERR! code ELIFECYCLE
npm ERR! errno
npm ERR! angular-quickstart@1.0. start: `concurrently "npm run build:watch" "npm run serve"`
npm ERR! Exit status
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0. start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/--14T13_05_48_238Z-debug.log

解决办法:我执行命令的位置是/home/gjj/xxx,这是一个用户目录,出现上面的原因是空间不足。我怀疑是此目录空间的问题,你可以先将项目移至/usr/local/xxx下再次npm start,如果还不行,请参看一下方案,此方案来自https://stackoverflow.com/questions/22475849/node-js-error-enospc

执行如下命令:

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

对于Arch Linux,将下面这行添加到/etc/sysctl.d/99-sysctl.conf文件中

fs.inotify.max_user_watches=524288

vim /etc/sysctl.d/-sysctl.conf
#添加到最后
fs.inotify.max_user_watches=524288
#完成后执行
sysctl --system
 

npm start问题的更多相关文章

  1. 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法

    如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...

  2. npm 私有模块的管理使用

    你可以使用 NPM 命令行工具来管理你在 NPM 仓库的私有模块代码,这使得在项目中使用公共模块变的更加方便. 开始前的工作 你需要一个 2.7.0 以上版本的 npm ,并且需要有一个可以登陆 np ...

  3. NPM (node package manager) 入门 - 基础使用

    什么是npm ? npm 是 nodejs 的包管理和分发工具.它可以让 javascript 开发者能够更加轻松的共享代码和共用代码片段,并且通过 npm 管理你分享的代码也很方便快捷和简单. 截至 ...

  4. Npm包的开发

    个人开发包的目录结构 ├── coverage //istanbul测试覆盖率生成的文件 ├── index.js //入口文件 ├── introduce.md //说明文件 ├── lib │   ...

  5. npm package.json属性详解

    概述 本文档是自己看官方文档的理解+翻译,内容是package.json配置里边的属性含义.package.json必须是一个严格的json文件,而不仅仅是js里边的一个对象.其中很多属性可以通过np ...

  6. npm 使用小结

    本文内容基于 npm 4.0.5 概述 npm (node package manager),即 node 包管理器.这里的 node 包就是指各种 javascript 库. npm 是随同 Nod ...

  7. Node.js npm 详解

    一.npm简介 安装npm请阅读我之前的文章Hello Node中npm安装那一部分,不过只介绍了linux平台,如果是其它平台,有前辈写了更加详细的介绍. npm的全称:Node Package M ...

  8. 升级npm

    查看npm的所有版本 运行命令: npm view npm versions 命令运行后,会输出到目前为止npm的所有版本. [ '1.1.25', '1.1.70', '1.1.71', '1.2. ...

  9. NPM如何更新到最新版

    参考文章--npm更新到最新版本的方法 其实我们可以这样,随便新建一个文件夹例如:F:\test.按着"shift"键,右键该文件夹,选择"在此处打开命令窗口(W)&qu ...

  10. npm源切换

    版权声明:欢迎转载,请附加转载来源:一路博客(http://www.16boke.com)   目录(?)[+] 安装 使用 列出可选的源 切换 增加源 删除源 测试速度 许可 项目主页   我们介绍 ...

随机推荐

  1. JSP | 基础 | JSP行为 | incline && forward

    语法 描述 jsp:include 用于在当前页面中包含静态或动态资源 jsp:forward 从一个JSP文件向另一个文件传递一个包含用户请求的request对象 index.jsp <%@ ...

  2. CF850 E. Random Elections

    题目传送门:CF 题目大意: 现有\(A,B,C\)三人参加竞选,有n个市民对其进行投票,每个市民心中对三人都有一个优先顺序(如市民\(i\)对三人的优先顺序为\(A-C-B\),则凡是有\(A\)的 ...

  3. Mirror Number SPOJ - MYQ10

    Mirror Number SPOJ - MYQ10 题意:http://blog.csdn.net/hcbbt/article/details/38349367 稍微改一下http://www.cn ...

  4. 状态压缩DP SRM 667 Div1 OrderOfOperations 250

    Problem Statement      Cat Noku has just finished writing his first computer program. Noku's compute ...

  5. 记录Jmeter集成Jenkins运行Ant做接口监听

    最近在鼓捣Jmeter的接口测试,把他集成到了Jenkins上做自动化接口监听.把操作记录下来. 首先就是进行接口测试的编写.打开Jmeter.主要是把接口的测试逻辑和断言处理调通后就OK了,接口程序 ...

  6. oracle 10g standby 设置

    ##########sample alter system set log_archive_dest_1 = 'LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=bo ...

  7. 正则表达式test报错 is not a function

    var reg = "/^1[34578]\d{9}$/"; //错误格式,这是一个字符串 var reg2 = /^1[34578]\d{9}$/; //正确格式 reg .te ...

  8. hihocoder1718 最长一次上升子序列

    思路: 对于每个i,分别求1~i和i+1~N两部分的最长下降子序列“拼”起来,最终取最大长度即可.学习了如何使用BIT把LIS问题O(N2)算法优化为O(Nlog(N))的算法. https://ww ...

  9. How exception works ?

    这是2013年写的一篇旧文,放在gegahost.net上面 http://raison.gegahost.net/?p=28 February 18, 2013 How exception work ...

  10. IE11/Flash页游白屏怎么办!立刻开启IE大地址模式!缓解浏览器白屏问题

    您是否经常发现IE白屏了,具体表现为点开新网页时无法显示,只能切换标签,用任务管理器一看,内存1.2G之多. 这是因为IE11可能有内存泄露问题,内存不断增长以至于无法申请新的内存,于是IE就完蛋了! ...