简体   繁体   English

npm install -g nodemon 错误! 我该如何解决这个错误

[英]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”时,错误消息不断出现。

  1. What kind of error message is this?这是什么样的错误信息?
  2. What can I do to resolve it?我能做些什么来解决它?
  3. What should I study to learn about the route setting of Nodejs? Nodejs的路由设置要学什么?

I ask for your help.我请求你的帮助。

error page错误页面

⬇ err messages is here ⬇ ⬇ 错误信息在这里⬇

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.然后似乎安装完成。

  1. What is the difference of these ( npm install nodemon / npm -g install nodemon )这些有什么区别( npm install nodemon / npm -g install nodemon )

enter image description here在此处输入图像描述

-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.

相关问题 angular:npm 安装-g @angular/cli npm 错误? 代码ENOTFOUND? - angular : npm install -g @angular/cli npm ERR! code ENOTFOUND? npm 错误:错误号,-13:npm 错误! 代码:'EACCES' 当使用 npm install -g @vue/cli - npm ERR! errno: -13, npm ERR! code: 'EACCES' when use npm install -g @vue/cli 如何修复节点服务器错误 npm ERR? 代码 ELIFECYCLE npm 错误! 错误1? - How do I fix a node server error, npm ERR! code ELIFECYCLE npm ERR! errno 1? npm 安装-g @sanity/cli npm 错误:代码 EPERM npm 错误! 系统调用 mkdir npm 错误! 路径 C:\Program Files\Git\usr\local npm 错误! 错误号-4048 - npm install -g @sanity/cli npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Program Files\Git\usr\local npm ERR! errno -4048 吉普错误! npm 安装 - gyp ERR! npm install 运行npm install -g yo命令给出-> ERR - Running npm install -g yo command gives -> ERR 如何解决 NPM 安装错误 gyp ERR - How to solve NPM Install Errors gyp ERR npm 错误。 代码 ERESOLVE npm 错误! ERESOLVE 无法解析。 当我运行 npm 安装时 - npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve. When I ran npm install `npm install npm`给出gyp ERR和npm ERR - `npm install npm` gives gyp ERR and npm ERR 如何解决 npm 安装错误“npm ERR? 代码 1”? - How to solve npm install error “npm ERR! code 1”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM