问题:在执行命令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. Python入门小练习 003 利用cookielib模拟登录获取账户信息

    为了方便, 使用chinaunix的账户获取账户主题. 有些网站可能需要验证码,  找一些不用验证码的网站 下面 ****** 很多个星号的均为私密信息, 所以用星号代替 #!/usr/bin/pyt ...

  2. Educational Codeforces Round 19 A

    Description Given a positive integer n, find k integers (not necessary distinct) such that all these ...

  3. solr 统计中stats的一般用法

    //统计数据 根据查询条件 public String getStats(String ipName) { JSONObject obj; JSONArray pageArray = new JSON ...

  4. Linux常用命令awk

    awk能够处理类似csv这种按行格式的数据,对每一行record按照-F指定的分隔符切割,然后处理.默认支持空格和\t分隔符 1.统计文件里某一列数据等于某个值的个数 -0_djt10.txt 2.拼 ...

  5. Redis学习笔记1-安装配置

    一.Redis安装 Redis官网:http://www.redis.io/download 注意:版本号2.4,2.6,2.8等偶数结尾为稳定版,2.5等为非稳定版本,生成环境应该使用稳定版 下载解 ...

  6. Git之提交项目到远程github

    1.在分支dev下,默认本地工作区有项目project 2. git add project  [添加项目到暂存区] 3. git commit project -m "提交项目" ...

  7. angular(一)路由的配置(1)

    本篇文章是最近在公司里做项目的时候,尝试配置路由的过程.由于头尾,和路由主体,包括控制器组长都已配置好,我这里只是单纯的写一些配置单个副页面的过程.大家肯定会有看不懂的地方,后续会陆续更新完整的配置全 ...

  8. logging模块基础

    很多程序都有记录日志的需求,日志不仅可以保存访问记录,也可以有错误,警告等信息输出. python的logging模块提供了标准的日志接口,可以通过logging存储各种格式的日志.logging模块 ...

  9. vue-cli下配置项目访问ip和服务器ip

    一.配置项目访问ip,让本次代码支持localhost以外的ip地址访问模式:修改里的host配置,代码如下. 修改完记得 "npm run dev"重启服务. 二.在本地架设服务 ...

  10. Arduino Ethernet W5100扩展板的指示灯含义

    Arduino Ethernet W5100扩展板是继承WIZnet W5100网络芯片的扩展板.将扩展板连接到Arduino后,可使Arduino具有网络功能.此扩展板上有多个指示灯,由于轻易查不到 ...