【问题标题】:'pm2' is not recognized as an internal or external command, operable program or batch file error'pm2' 未被识别为内部或外部命令、可运行程序或批处理文件错误
【发布时间】:2021-09-09 11:05:37
【问题描述】:

这是我在安装 pm2 时收到的错误消息,尝试清理缓存并在管理员模式下运行但没有用,可能是什么问题?可能永远安装也会影响它?

npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'D:\\Users\\xxx\\AppData\\Roaming\\npm\\node_modules\\pm2\\package.json.3819841862',
npm ERR!   dest: 'D:\\Users\\xxx\\AppData\\Roaming\\npm\\node_modules\\pm2\\package.json'
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

标签: npm-install pm2


【解决方案1】:

如果您排除了管理员权限的问题,那么它是另一个程序 - 您是否尝试过禁用正在运行的防病毒软件?

之后如果问题仍然存在,我会进入任务管理器并停止所有多余的进程。

如果之后你仍然有这个问题,我会在全球范围内重新安装 pm2

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 2015-12-30
  • 2018-07-08
  • 2023-03-22
  • 1970-01-01
  • 2022-01-22
  • 1970-01-01
  • 2014-10-14
相关资源
最近更新 更多