我再也不能用npm安装任何东西了。奇怪的是它开始在我的两台电脑上同时发生,两台电脑都得到同样的错误。
我得到了以下错误,不管我尝试安装什么npm软件包,它都是一样的。
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@auth0%2fangular-jwt reason: Invalid response body while trying to fetch https://registry.npmjs.org/@auth0%2fangular-jwt: EBUSY: resource busy or locked, rename 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\tmp\c1a8147d' -> 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\content-v2\sha512\fd\a4\adcec67b71410555dd3333c58bdcf047b492ef8c074a1b3c22ccc17430068e7f94b3c201a45387cb72c0d0708c21d1600e92240f59464cb2d945ee2b38ed'
我试过重新安装,清空该高速缓存.我按照这个回答:https://www.reddit.com/r/npm/comments/v9m08x/npm_err_code_ebusy/
"什么都不管用,有人知道是什么引起的吗"
日志中的完整错误:
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@8.19.2
2 info using node@v16.18.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\nicki\source\repos\PowerConsumptionOverview\PowerConsumptionOverview\ClientApp\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\nicki\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\nicki\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 8ms
19 timing npm:load:configload Completed in 8ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm i @auth0/angular-jwt
23 verbose argv "i" "@auth0/angular-jwt"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 1ms
26 timing npm:load:display Completed in 2ms
27 verbose logfile logs-max:10 dir:C:\Users\nicki\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\nicki\AppData\Local\npm-cache\_logs\2022-10-16T16_21_13_880Z-debug-0.log
29 timing npm:load:logFile Completed in 4ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 16ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 2 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 337ms
37 timing idealTree:userRequests Completed in 3ms
38 silly idealTree buildDeps
39 silly fetch manifest @auth0/angular-jwt@*
40 timing arborist:ctor Completed in 0ms
41 http fetch GET 200 https://registry.npmjs.org/@auth0%2fangular-jwt 2085ms (cache miss)
42 silly placeDep ROOT @auth0/angular-jwt@ OK for: powerconsumptionoverview@0.0.0 want: *
43 timing idealTree:#root Completed in 2090ms
44 timing idealTree:node_modules/@auth0/angular-jwt Completed in 0ms
45 timing idealTree:buildDeps Completed in 2090ms
46 timing idealTree:fixDepFlags Completed in 4ms
47 timing idealTree Completed in 2436ms
48 timing command:i Completed in 2444ms
49 verbose type invalid-json
50 verbose stack FetchError: invalid json response body at https://registry.npmjs.org/@auth0%2fangular-jwt reason: Invalid response body while trying to fetch https://registry.npmjs.org/@auth0%2fangular-jwt: EBUSY: resource busy or locked, rename 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\tmp\c1a8147d' -> 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\content-v2\sha512\fd\a4\adcec67b71410555dd3333c58bdcf047b492ef8c074a1b3c22ccc17430068e7f94b3c201a45387cb72c0d0708c21d1600e92240f59464cb2d945ee2b38ed'
50 verbose stack at Response.json (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:79:13)
50 verbose stack at async RegistryFetcher.packument (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:99:25)
50 verbose stack at async RegistryFetcher.manifest (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:124:23)
50 verbose stack at async Arborist.[nodeFromEdge] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:19)
50 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:930:11)
50 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:211:7)
50 verbose stack at async Promise.all (index 1)
50 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:153:5)
50 verbose stack at async Install.exec (C:\Program Files\nodejs\node_modules\npm\lib\commands\install.js:145:5)
50 verbose stack at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli.js:78:5)
51 verbose cwd C:\Users\nicki\source\repos\PowerConsumptionOverview\PowerConsumptionOverview\ClientApp
52 verbose Windows_NT 10.0.22000
53 verbose node v16.18.0
54 verbose npm v8.19.2
55 error code FETCH_ERROR
56 error errno FETCH_ERROR
57 error invalid json response body at https://registry.npmjs.org/@auth0%2fangular-jwt reason: Invalid response body while trying to fetch https://registry.npmjs.org/@auth0%2fangular-jwt: EBUSY: resource busy or locked, rename 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\tmp\c1a8147d' -> 'C:\Users\nicki\AppData\Local\npm-cache\_cacache\content-v2\sha512\fd\a4\adcec67b71410555dd3333c58bdcf047b492ef8c074a1b3c22ccc17430068e7f94b3c201a45387cb72c0d0708c21d1600e92240f59464cb2d945ee2b38ed'
58 verbose exit 1
59 timing npm Completed in 2592ms
60 verbose unfinished npm timer reify 1665937274023
61 verbose unfinished npm timer reify:loadTrees 1665937274030
62 verbose code 1
63 error A complete log of this run can be found in:
63 error C:\Users\nicki\AppData\Local\npm-cache\_logs\2022-10-16T16_21_13_880Z-debug-0.log
1条答案
按热度按时间olhwl3o21#
好吧,对于其他可能偶然发现这个的人来说。这是我的杀毒软件。即使我认为我杀了它,我们仍然在后台运行进程,这显然锁定了npm在temp文件夹中创建的文件