安装adsl-172-10-9-42:~ mixueer$ npm install -g newman-reporter-htmlextra报错
pm WARN newman-reporter-htmlextra@1.20.3 requires a peer of newman@^5.1.2 but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mixueer/.npm/_logs/2021-04-22T08_42_16_367Z-debug.log
原因: 执行命令行命令时没有获得管理员权限
解决办法: 在命令前面加上sudo即可.然后输入电脑的管理员密码操作即可完成.
mac电脑输入密码时不会显示,没关系输入正确的密码后直接回车即可。