运行start-script / w本地nodemon / mocha / babel-node时,Linux上的Node中的“Permission Denied”

我遇到了新的 Linux设置问题 – 我已将nodemon安装为本地依赖项(非全局),我正在尝试从我的package.json“start”-script执行它.我收到此权限错误.

节点本身效果很好,但是一旦我尝试使用babel-node或nodemon甚至是mocha,我就会遇到权限问题.

我的设置分为两个硬盘驱动器 – 节点安装在我的SSD(我的操作系统)上,我的项目(以及我正在尝试执行nodemon的node_modules是在我的存储硬盘上.

sh: 1: nodemon: Permission denied

npm ERR! Linux 3.19.0-56-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v5.9.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `nodemon --exec node entry`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] start script 'nodemon --exec node entry'.
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 vyggo-easyrtc package,npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     nodemon --exec node entry
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vyggo-easyrtc
npm ERR! Or if that isn't available,you can get their info via:
npm ERR!     npm owner ls vyggo-easyrtc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /media/goatic/HDD/Projects/Node/vyggo-easyrtc/npm-debug.log
goatic@goatic-laptop:/media/goatic/HDD/Projects/Node/vyggo-easyrtc$

解决方法

将我的项目从NTFS文件系统转移到linux后,我遇到了这个问题.我将所有文件/目录权限更改为644/755,并设置所有者/组.那是我开始收到这个错误的时候.

当我在终端中尝试nodemon时,我找不到命令.奇怪.

重新安装nodemon修复它:

sudo npm install -g nodemon

相关文章

/etc/sysctl.conf这个目录主要是配置一些系统信息,/etc/sys...
1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起...
它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅...
不管是我们在安装软件还是监测软件的使用性能,我们都要随时...
装好Tomcat7后,发现除了本机能访问外界访问不了,岂有此理。...
修改防火墙配置需要修改 /etc/sysconfig/iptables 这个文件,...