【问题标题】:Facing error code ENOENT syscall rename errno -4058 while trying to install node packages尝试安装节点包时遇到错误代码 ENOENT syscall rename errno -4058
【发布时间】:2020-09-27 01:49:24
【问题描述】:

我一直在尝试安装几个总是导致 npm ERR 的节点包(图片附在下面)。我能够安装 express 包,但不能安装 mongoose、mongodb、@angular/cli,在安装过程中我遇到了这个错误。

以下是我的 node 和 npm 版本

下面是保存的错误日志。

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'E:\\Nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Nanda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   '@angular/cli'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v12.16.3
4 verbose npm-session aa9c7864071a84f9
.
.
.
75 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7' -> 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09'
76 verbose cwd C:\Users\Nanda
77 verbose Windows_NT 6.1.7601
78 verbose argv "E:\\Nodejs\\node.exe" "C:\\Users\\Nanda\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
79 verbose node v12.16.3
80 verbose npm  v6.14.5
81 error code ENOENT
82 error syscall rename
83 error path C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7
84 error dest C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09
85 error errno -4058
86 error enoent ENOENT: no such file or directory, rename 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\tmp\d74359a7' -> 'C:\Users\Nanda\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\1a\94\b0bf25ce70e3a557bd2f6e7ce38f87d6e715bf15d505ea7404b7510dcbb9b86427338b5fbf6ee5543c0aa619fab39ec391345cd432372d4c8a7c6bdb6e09'
87 error enoent This is related to npm not being able to find a file.
88 verbose exit [ -4058, true ]

注意:我使用的是 Windows 7 32 位系统

【问题讨论】:

    标签: node.js npm angular-cli node-modules npm-install


    【解决方案1】:

    我遇到了类似的问题,在 github 上找到了以下条目: https://github.com/mapbox/node-sqlite3/issues/900

    我刚刚删除了现有的 node_modules 并使用“npm install”重新安装了它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-07
      • 2016-08-09
      • 2016-09-14
      相关资源
      最近更新 更多