Javascript nodemon包未安装在nodejs中

Javascript nodemon包未安装在nodejs中,javascript,node.js,mean-stack,Javascript,Node.js,Mean Stack,nodemon软件包未使用nodejs成功安装。我使用了npm安装-g nodmon。我收到了下面与权限相关的错误 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/nodemon/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2

nodemon软件包未使用nodejs成功安装。我使用了npm安装-g nodmon。我收到了下面与权限相关的错误

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/nodemon/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! path ../lib/node_modules/nodemon/bin/nodemon.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon'
npm ERR!  { [Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon']
npm ERR!   cause:
npm ERR!    { Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'symlink',
npm ERR!      path: '../lib/node_modules/nodemon/bin/nodemon.js',
npm ERR!      dest: '/usr/bin/nodemon' },
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, symlink \'../lib/node_modules/nodemon/bin/nodemon.js\' -> \'/usr/bin/nodemon\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/nodemon/bin/nodemon.js',
npm ERR!   dest: '/usr/bin/nodemon' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/etech7/.npm/_logs/2019-07-02T11_31_52_856Z-debug.log

尝试用sudo安装它。这是因为您需要管理员权限

sudo npm install -g nodemon

希望有帮助

尝试用sudo安装它。这是因为您需要管理员权限

sudo npm install -g nodemon

希望有帮助

这是一个权限问题,如错误消息所示。您需要修复权限或使用sudo。请参阅:

如错误消息所示,这是一个权限问题。您需要修复权限或使用sudo。请参阅:

也许可以尝试以下方法:我会安装。节点版本管理器管理您的全局软件包,使它们都驻留在您的主目录中,这意味着您不必使用sudo来安装它们。也许可以尝试以下方法:我会安装。Node Version Manager管理您的全局软件包,使它们都位于您的主目录中,这意味着您不必使用sudo来安装它们。是的,Cooper博士,您是对的,它需要linux中的管理员权限。我尝试使用下面的命令,它的工作。sudo npm安装-g nodemonyes感谢Cooper博士。我使用的是Mac OS,这对我来说比Syes Cooper博士你说得对,它需要linux中的管理员权限。我尝试使用下面的命令,它的工作。sudo npm安装-g nodemonyes感谢Cooper博士。我正在使用Mac OS,这对我来说比