[英]npm install -g nodemon err! How do I get through this err
I am studying node js, express.我正在研究节点js,表达。 When I try to install 'nodemon', Error messages keep coming out.
当我尝试安装“nodemon”时,错误消息不断出现。
I ask for your help.我请求你的帮助。
npm ERR! npm 错误! code EACCES
代码 EACCES
npm ERR! npm 错误! syscall mkdir
系统调用 mkdir
npm ERR! npm 错误! path /usr/local/lib/node_modules/nodemon
路径 /usr/local/lib/node_modules/nodemon
npm ERR! npm 错误! errno -13
错误号 -13
npm ERR: Error: EACCES, permission denied, mkdir '/usr/local/lib/node_modules/nodemon' npm ERR:错误:EACCES,权限被拒绝,mkdir '/usr/local/lib/node_modules/nodemon'
npm ERR: [Error: EACCES, permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] { npm ERR:[错误:EACCES,权限被拒绝,mkdir '/usr/local/lib/node_modules/nodemon'] {
npm ERR: errno, -13, npm ERR:错误号,-13,
npm ERR: code, 'EACCES', npm ERR:代码,“EACCES”,
npm ERR: syscall, 'mkdir', npm ERR:系统调用,'mkdir',
npm ERR: path: '/usr/local/lib/node_modules/nodemon' npm ERR! npm ERR:路径:'/usr/local/lib/node_modules/nodemon' npm 错误! }
}
npm ERR! npm 错误!
npm ERR. npm 错误。 The operation was rejected by your operating system.
该操作被您的操作系统拒绝。
npm ERR! npm 错误! It is likely you do not have the permissions to access this file as the current user
您可能没有以当前用户身份访问此文件的权限
npm ERR! npm 错误!
npm ERR, If you believe this might be a permissions issue, please double-check the npm ERR,如果您认为这可能是权限问题,请仔细检查
npm ERR, permissions of the file and its containing directories, or try running npm ERR,文件及其包含目录的权限,或尝试运行
npm ERR. npm 错误。 the command again as root/Administrator.
再次以 root/管理员身份执行该命令。
npm ERR: A complete log of this run can be found in: npm ERR:此运行的完整日志可在以下位置找到:
npm ERR. npm 错误。 /Users/mac/.npm/_logs/2022-09-05T12_16_18_604Z-debug-0.log
/Users/mac/.npm/_logs/2022-09-05T12_16_18_604Z-debug-0.log
And I put this 'npm install nodemon' on the terminal.我把这个“npm install nodemon”放在终端上。
then it seems like install complete.然后似乎安装完成。
-g is used for global installation. -g 用于全局安装。
Try npm install nodemon
in your project.尝试
npm install nodemon
。
Use sudo
to run the command:使用
sudo
运行命令:
sudo npm i - g nodemon
Have a look at: Problem installing nodemon globally on macOS Mojave看看: 在 macOS Mojave 上全局安装 nodemon 时出现问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.