安装newman
- 打开cmd输入: npm install -g newman
- 校验:安装完成后,输入 newman -v 命令查看版本信息,检测是否安装成功
报错信息
npm notice
npm notice New major version of npm available! 8.15.0 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g npm@9.2.0 to update!
npm notice
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path E:\node\node_global\node_modules
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'E:\node\node_global\node_modules'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'E:\node\node_global\node_modules'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'E:\\node\\node_global\\node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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! E:\node\node_cache\_logs\2022-12-16T06_04_36_211Z-debug-0.log
npm ERR! Error: EPERM: operation not permitted, mkdir 'E:\node\node_global\node_modules'
这个文件夹不允许操作
解决方案:
找到该文件夹,修改权限即可解决
文章来源:https://www.toymoban.com/news/detail-562321.html
文章来源地址https://www.toymoban.com/news/detail-562321.html
到了这里,关于安装npm install XXXX报错-4048,解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!