npm start问题
问题:在执行命令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问题的更多相关文章
- 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法
如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...
- npm 私有模块的管理使用
你可以使用 NPM 命令行工具来管理你在 NPM 仓库的私有模块代码,这使得在项目中使用公共模块变的更加方便. 开始前的工作 你需要一个 2.7.0 以上版本的 npm ,并且需要有一个可以登陆 np ...
- NPM (node package manager) 入门 - 基础使用
什么是npm ? npm 是 nodejs 的包管理和分发工具.它可以让 javascript 开发者能够更加轻松的共享代码和共用代码片段,并且通过 npm 管理你分享的代码也很方便快捷和简单. 截至 ...
- Npm包的开发
个人开发包的目录结构 ├── coverage //istanbul测试覆盖率生成的文件 ├── index.js //入口文件 ├── introduce.md //说明文件 ├── lib │ ...
- npm package.json属性详解
概述 本文档是自己看官方文档的理解+翻译,内容是package.json配置里边的属性含义.package.json必须是一个严格的json文件,而不仅仅是js里边的一个对象.其中很多属性可以通过np ...
- npm 使用小结
本文内容基于 npm 4.0.5 概述 npm (node package manager),即 node 包管理器.这里的 node 包就是指各种 javascript 库. npm 是随同 Nod ...
- Node.js npm 详解
一.npm简介 安装npm请阅读我之前的文章Hello Node中npm安装那一部分,不过只介绍了linux平台,如果是其它平台,有前辈写了更加详细的介绍. npm的全称:Node Package M ...
- 升级npm
查看npm的所有版本 运行命令: npm view npm versions 命令运行后,会输出到目前为止npm的所有版本. [ '1.1.25', '1.1.70', '1.1.71', '1.2. ...
- NPM如何更新到最新版
参考文章--npm更新到最新版本的方法 其实我们可以这样,随便新建一个文件夹例如:F:\test.按着"shift"键,右键该文件夹,选择"在此处打开命令窗口(W)&qu ...
- npm源切换
版权声明:欢迎转载,请附加转载来源:一路博客(http://www.16boke.com) 目录(?)[+] 安装 使用 列出可选的源 切换 增加源 删除源 测试速度 许可 项目主页 我们介绍 ...
随机推荐
- 二分图最大匹配初探 By cellur925
一.什么是二分图 首先它需要是一张无向图. 之后它需要同时满足两个条件:①它的N个点被分为两个集合,且这两个集合交集为空:②同一集合内的点之间没有边相连. 二.无向图是否为二分图的判定 引理:无向图是 ...
- the little schemer 笔记(7)
第七章 Friends and Relations 这是一个set集合吗 (apple peaches apple plum) 不是,apple出现了不止一次 (set? lat) 是真还是假,其中l ...
- 大数模板 (C ++)
上次BC遇到一个大数题目,没有大数模板和不会使用JAVA的同学们GG了,赛后从队友哪里骗出大数模板.2333333,真的炒鸡nice(就是有点长),贴出来分享一下好辣. //可以处理字符串前导零 #i ...
- c#自定义鼠标形状
更改鼠标指针,需要使用到 Windows API: 1. 添加命名空间的引用: using System.Runtime.InteropServices; using System.Reflectio ...
- AJPFX关于一维数组的声明与初始化
一维数组:可以理解为一列多行.类型相同的数据,其中每个数据被称为数组元素:一维数组的声明方式: type varName[]; 或 type[] varName;(推荐) ...
- hihocoder1133 二分·二分查找之k小数
思路: 类似于快排的分治算法. 实现: #include <iostream> #include <cstdio> #include <algorithm> #in ...
- STM32&AT指令NBIOT模组
#include "nbiot.h" #include "string.h" #include "stdlib.h" #include &q ...
- Android利用融云做异地登录提醒
在RongCloudEvent下找到onChanged方法 @Override public void onChanged(ConnectionStatus connectionStatus) { s ...
- SPI总线小结
串行外设接口(Serial Peripheral Interface,SPI)的缩写.是一种高速的,全双工,同步的通信总线,并且在芯片的管脚上只占用四根线.Motorola首先在其MC68HCXX系列 ...
- Can't locate ExtUtils/MakeMaker.pm in @INC
Can't locate ExtUtils/MakeMaker.pm in @INC 解决办法:yum install perl-devel