【问题标题】:I have a problem installing my node module depandances for Angular我在为 Angular 安装节点模块 depandances 时遇到问题
【发布时间】:2020-03-17 06:49:08
【问题描述】:

当我执行 npm install 时,最后出现错误:

error syscall unlink
22396 error The operation was rejected by your operating system.
22396 error It's possible that the file was already in use (by a text editor or antivirus),
22396 error or that you lack permissions to access it.
22396 error
22396 error If you believe this might be a permissions issue, please double-check the
22396 error permissions of the file and its containing directories, or try running
22396 error the command again as root/Administrator (though this is not recommended).
22397 verbose exit [ -4048, true ]

不知道为什么

【问题讨论】:

  • Windows 中的 Sudo?

标签: javascript angular npm node-modules npm-install


【解决方案1】:

这通常发生在该特定文件正忙或当前正在使用时。

您可以通过以下方式解决此问题。

  1. 关闭代码编辑器并重试
  2. 如果仍然无法解决问题,请关闭应用程序的任何实例。
  3. 然后重新启动系统以终止任何可能使用该文件的进程并重试。
  4. 如果您使用的是 linux 或 mac 机器,请使用 sudo npm install ${package_name}

希望对你有帮助

【讨论】:

    【解决方案2】:

    你试过了吗

    1. 以管理员权限打开终端(以管理员身份运行)。
    2. 关闭所有项目相关文件并再次执行命令。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-05
      • 2019-04-12
      • 1970-01-01
      • 1970-01-01
      • 2019-02-23
      • 1970-01-01
      相关资源
      最近更新 更多