Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;“拒绝许可”;在Linux上的节点中,运行启动脚本/w local nodemon/mocha/babel Node时_Linux_Node.js_Permissions_Dependencies - Fatal编程技术网

&引用;“拒绝许可”;在Linux上的节点中,运行启动脚本/w local nodemon/mocha/babel Node时

&引用;“拒绝许可”;在Linux上的节点中,运行启动脚本/w local nodemon/mocha/babel Node时,linux,node.js,permissions,dependencies,Linux,Node.js,Permissions,Dependencies,我的新linux设置有问题-我已经将nodemon安装为本地依赖项(而不是全局依赖项),并试图从package.json“start”脚本执行它。我得到了这个权限错误 node本身非常有效,但只要我尝试使用babel node或nodemon甚至mocha,我就会遇到权限问题 我的设置分为两个硬盘驱动器-节点安装在我的SSD(带操作系统)和我的项目(以及它的节点单元模块)上,我试图从中执行的nodemon位于我的存储HDD上 sh: 1: nodemon: Permission denied

我的新linux设置有问题-我已经将nodemon安装为本地依赖项(而不是全局依赖项),并试图从package.json“start”脚本执行它。我得到了这个权限错误

node
本身非常有效,但只要我尝试使用
babel node
nodemon
甚至
mocha
,我就会遇到权限问题

我的设置分为两个硬盘驱动器-节点安装在我的SSD(带操作系统)和我的项目(以及它的节点单元模块)上,我试图从中执行的
nodemon
位于我的存储HDD上

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! vyggo-easyrtc@1.0.0 start: `nodemon --exec node entry`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the vyggo-easyrtc@1.0.0 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$

我的辅助驱动器在权限方面与linux操作系统不兼容,因为它是NTFS分区

最后,我将所有内容都移动到主驱动器,当然,权限又起作用了,允许我执行本地依赖项


如果我依赖于将项目保留在辅助驱动器上,我想解决问题的方法是将其格式化为与Linux权限兼容的格式。

将项目从NTFS文件系统移动到Linux后,我遇到了这个问题。我将所有文件/目录权限更改为644/755,并设置了所有者/组。这就是当我开始出现这个错误时

当我在终端中尝试nodemon时,我得到了
未找到的命令
。奇怪

重新安装nodemon修复了它:

sudo npm install -g nodemon

如果您正在MAC中安装,请使用

sudo npm install -g nodemon --unsafe-perm.

它会起作用。

我也遇到了同样的问题。在我将操作系统改为Linux Ubuntu 20.04.1版本时,重新安装
nodemon
解决了这个问题

对于Linux用户:

sudo npm install -g nodemon 
对于Windows用户,打开一个新终端或
cmd
prompt只需编写:

npm install -g nodemon
有关更多信息,请查看
nodemon
文档:


这是我问题的解决方案您需要将正在执行的文件设置为可执行文件
chmod 711您的/files
此解决方案修复了我的错误;我有一个运行正常的Windows项目,Git通过Linux机器上的VSCode克隆了此Repo;npm安装除了nodemon之外一切正常;我在全局范围内安装,作为指导,并工作我想要一个魅力,甚至不需要重新加载项目。