node-gyp build error while running npm install in reactjs - node.js

I took a frontend project repo which is built on reactjs & WHILE I run npm i command it is giving me whole bunch of error.
I tried deleting package.lock.json file & again run the command
I tried by doing npm update
I tried npm i --force & npm update --force
But same error is giving ..
update
I forcely cache cleaned using this command npm cache clean -f. After that I again run npm i.. now giviing this error...
0 verbose cli [
0 verbose cli '/usr/local/Cellar/node/16.11.1/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'i'
0 verbose cli ]
1 info using npm#8.1.2
2 info using node#v16.11.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/macbookpro/Desktop/private_project/xyzvara/to-let/.npmrc Completed in 1ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/Users/macbookpro/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:setTitle Completed in 3ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 4ms
23 timing npm:load:cleanupLog Completed in 2ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 22ms
27 timing arborist:ctor Completed in 1ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree:init Completed in 19ms
30 timing idealTree:userRequests Completed in 0ms
31 silly idealTree buildDeps
32 silly fetch manifest #ckeditor/ckeditor5-build-classic#^25.0.0
33 http fetch GET 200 https://registry.npmjs.org/#ckeditor%2fckeditor5-build-classic 2340ms (cache miss)
34 silly fetch manifest #ckeditor/ckeditor5-react#^3.0.2
35 http fetch GET 200 https://registry.npmjs.org/#ckeditor%2fckeditor5-react 2069ms (cache miss)
36 silly fetch manifest react#^16.14.0
37 http fetch GET 200 https://registry.npmjs.org/react 905ms (cache miss)
38 silly fetch manifest #hookform/devtools#^3.1.0
39 http fetch GET 200 https://registry.npmjs.org/#hookform%2fdevtools 1461ms (cache miss)
40 silly fetch manifest react#>=17.0.2
41 timing idealTree Completed in 6832ms
42 timing command:install Completed in 6858ms
43 verbose stack Error: unable to resolve dependency tree
43 verbose stack at Arborist.[failPeerConflict] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:1356:25)
43 verbose stack at Arborist.[loadPeerSet] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:1322:34)
43 verbose stack at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:930:11)
43 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:216:7)
43 verbose stack at async Promise.all (index 1)
43 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:149:5)
43 verbose stack at async Install.install (/usr/local/lib/node_modules/npm/lib/install.js:170:5)
44 verbose cwd /Users/macbookpro/Desktop/private_project/xyzvara/to-let
45 verbose Darwin 20.3.0
46 verbose argv "/usr/local/Cellar/node/16.11.1/bin/node" "/usr/local/bin/npm" "i"
47 verbose node v16.11.1
48 verbose npm v8.1.2
49 error code ERESOLVE
50 error ERESOLVE unable to resolve dependency tree
51 error
52 error While resolving: [1mtolet[22m#[1m0.1.0[22m
52 error Found: [1mreact[22m#[1m16.14.0[22m[2m[22m
52 error [2mnode_modules/react[22m
52 error [1mreact[22m#"[1m^16.14.0[22m" from the root project
52 error
52 error Could not resolve dependency:
52 error [35mpeer[39m [1mreact[22m#"[1m>=17.0.2[22m" from [1m#hookform/devtools[22m#[1m3.1.0[22m[2m[22m
52 error [2mnode_modules/#hookform/devtools[22m
52 error [1m#hookform/devtools[22m#"[1m^3.1.0[22m" from the root project
52 error
52 error Fix the upstream dependency conflict, or retry
52 error this command with --force, or --legacy-peer-deps
52 error to accept an incorrect (and potentially broken) dependency resolution.
52 error
52 error See /Users/macbookpro/.npm/eresolve-report.txt for a full report.
53 verbose exit 1
update 2
I encountered an error that telling network error. So, to faster loading speed I installed yarn & run yarn install. After that strangely It installed node modules that was not happening while I was using npm . After that while tried to run the project It was giving node-sass error. so I did npm audit fix -f. but, It didn't fix all error but if I run command to start the project it is now running without giving error. Very strange , I don't have any perfect answer of this behaviour.

update 2
I encountered an error that telling network error. So, to faster loading speed I installed yarn & run yarn install. After that strangely It installed node modules that was not happening while I was using npm . After that while tried to run the project It was giving node-sass error. so I did npm audit fix -f. but, It didn't fix all error but if I run command to start the project it is now running without giving error. Very strange , I don't have any perfect answer of this behaviour.

Related

type 'npm install -g #vue/cli', npm show WARN and ERR

When I type npm install -g #vue/cli,
changed 851 packages, and audited 852 packages in 2m
64 packages are looking for funding
4 vulnerabilities (2 moderate, 2 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
But more WARN message but stackoverflow think it's spam.
appears. So, I did npm audit fix --force. And the terminal show this:
npm WARN using --force Recommended protections disabled.
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-12-31T23_04_36_391Z-debug-0.log
up to date, audited 1 package in 640ms
found 0 vulnerabilities
and C:\Users\user\AppData\Local\npm-cache\_logs\2022-12-31T23_04_36_391Z-debug-0.log log file is this:
0 verbose cli D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm#8.19.2
2 info using node#v18.12.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:D:\nodejs\node_modules\npm\npmrc Completed in 14ms
6 timing config:load:builtin Completed in 16ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\node-project\.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\user\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\user\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 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 31ms
19 timing npm:load:configload Completed in 31ms
20 timing npm:load:mkdirpcache Completed in 2ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm audit fix
23 verbose argv "audit" "fix" "--force"
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 7ms
26 timing npm:load:display Completed in 11ms
27 verbose logfile logs-max:10 dir:C:\Users\user\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\user\AppData\Local\npm-cache\_logs\2022-12-31T23_04_36_391Z-debug-0.log
29 timing npm:load:logFile Completed in 14ms
30 timing npm:load:timers Completed in 1ms
31 timing npm:load:configScope Completed in 0ms
32 warn using --force Recommended protections disabled.
33 timing npm:load Completed in 68ms
34 timing arborist:ctor Completed in 1ms
35 silly logfile start cleaning logs, removing 2 files
36 timing command:audit Completed in 29ms
37 verbose stack Error: loadVirtual requires existing shrinkwrap file
37 verbose stack at Arborist.loadVirtual (D:\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\load-virtual.js:63:18)
37 verbose stack at async Arborist.audit (D:\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\audit.js:25:18)
37 verbose stack at async Audit.auditAdvisories (D:\nodejs\node_modules\npm\lib\commands\audit.js:390:5)
37 verbose stack at async Audit.exec (D:\nodejs\node_modules\npm\lib\commands\audit.js:374:7)
37 verbose stack at async module.exports (D:\nodejs\node_modules\npm\lib\cli.js:78:5)
38 verbose cwd D:\node-project
39 verbose Windows_NT 10.0.19044
40 verbose node v18.12.1
41 verbose npm v8.19.2
42 error code ENOLOCK
43 error audit This command requires an existing lockfile.
44 error audit Try creating one first with: npm i --package-lock-only
45 error audit Original error: loadVirtual requires existing shrinkwrap file
46 verbose exit 1
47 timing npm Completed in 403ms
48 verbose unfinished npm timer audit 1672527876747
49 verbose code 1
50 error A complete log of this run can be found in:
50 error C:\Users\user\AppData\Local\npm-cache\_logs\2022-12-31T23_04_36_391Z-debug-0.log
Is this a normal installation? Is it an abnormal installation?
There seems to be a problem because there are a lot of ERR! letters. help.
Like the error output is telling you, you have to run the command npm i --package-lock-only.
Also see What does 'npm i --package-lock-only' do?
I think it should work
You execute this command. Install the package from yarn
yarn global add #vue/cli
and You can check you have the right version with this command:
vue --version

Problem installing npm passport package and removing node_modules (Node.js errno: -4094)

Can anyone help me out with this issue? I've tried to install npm passport package (as well as another packages for trial) unsuccessfully and I've got the following message at terminal:
z00441xk#md3n4gkc MINGW64 \~/Documentos/Samuel/Documento Pessoais/Node.js/Secrets (master)
$ npm i passport
npm ERR! code UNKNOWN
npm ERR! syscall rename
npm ERR! path C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk\\credential-pro
npm ERR! dest C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk.credential-pr
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, rename 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_moduocumentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk.credential-provider-sso-Hgt41GOO'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\\Users\\z00441xk\\AppData\\Local\\npm-cache_logs\\2022-12-08T09_19_34_435Z-debug-0.log
And the log has the following content:
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#v18.12.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\\Program Files\\nodejs\\node_modules\\npm\\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets.npmrc Completed in 1ms
10 timing config:load:project Completed in 7ms
11 timing config:load:file:C:\\Users\\z00441xk.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\\Users\\z00441xk\\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 17ms
19 timing npm:load:configload Completed in 17ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm i passport
23 verbose argv "i" "passport"
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 2ms
26 timing npm:load:display Completed in 3ms
27 verbose logfile logs-max:10 dir:C:\\Users\\z00441xk\\AppData\\Local\\npm-cache_logs
28 verbose logfile C:\\Users\\z00441xk\\AppData\\Local\\npm-cache_logs\\2022-12-08T09_01_48_742Z-debug-0.log
29 timing npm:load:logFile Completed in 12ms
30 timing npm:load:timers Completed in 1ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 36ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 2 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 135ms
37 timing idealTree:userRequests Completed in 2ms
38 silly idealTree buildDeps
39 silly fetch manifest passport#\*
40 verbose shrinkwrap failed to load node_modules/.package-lock.json \[Error: UNKNOWN: unknown error, readlink 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk\\credential-provider-sso'\] {
40 verbose shrinkwrap errno: -4094,
40 verbose shrinkwrap code: 'UNKNOWN',
40 verbose shrinkwrap syscall: 'readlink',
40 verbose shrinkwrap path: 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules\\#aws-sdk\\credential-provider-sso'
40 verbose shrinkwrap }
41 http fetch GET 200 https://registry.npmjs.org/passport 560ms (cache revalidated)
42 silly placeDep ROOT passport#0.6.0 OK for: secrets---starting-code#1.0.0 want: \*
43 silly fetch manifest passport-strategy#1.x.x
44 silly fetch manifest pause#0.0.1
45 http fetch GET 200 https://registry.npmjs.org/pause 151ms (cache revalidated)
46 http fetch GET 200 https://registry.npmjs.org/passport-strategy 354ms (cache revalidated)
47 timing idealTree:#root Completed in 922ms
48 silly placeDep ROOT passport-strategy#1.0.0 OK for: passport#0.6.0 want: 1.x.x
49 silly placeDep ROOT pause#0.0.1 OK for: passport#0.6.0 want: 0.0.1
50 timing idealTree:node_modules/passport Completed in 2ms
51 timing idealTree:node_modules/passport-strategy Completed in 0ms
52 timing idealTree:node_modules/pause Completed in 0ms
53 timing idealTree:buildDeps Completed in 924ms
54 timing idealTree:fixDepFlags Completed in 2ms
55 timing idealTree Completed in 1067ms
56 timing reify:loadTrees Completed in 1067ms
57 timing reify:diffTrees Completed in 14ms
58 silly reify mark retired \[
58 silly reify 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules\\#aws-sdk\\credential-provider-sso'
58 silly reify \]
59 silly reify moves {
59 silly reify 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules\\#aws-sdk\\credential-provider-sso': 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules\\#aws-sdk\\.credential-provider-sso-Hgt41GOO'
59 silly reify }
60 timing reify:rollback:retireShallow Completed in 3ms
61 timing command:i Completed in 1098ms
62 verbose stack Error: UNKNOWN: unknown error, rename 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk\\credential-provider-sso' -\> 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk.credential-provider-sso-Hgt41GOO'
63 verbose cwd C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets
64 verbose Windows_NT 10.0.19042
65 verbose node v18.12.0
66 verbose npm v8.19.2
67 error code UNKNOWN
68 error syscall rename
69 error path C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk\\credential-provider-sso
70 error dest C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk.credential-provider-sso-Hgt41GOO
71 error errno -4094
72 error UNKNOWN: unknown error, rename 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk\\credential-provider-sso' -\> 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules#aws-sdk.credential-provider-sso-Hgt41GOO'
73 verbose exit -4094
74 timing npm Completed in 1281ms
75 verbose unfinished npm timer reify 1670490108915
76 verbose unfinished npm timer reify:retireShallow 1670490110006
77 verbose code -4094
78 error A complete log of this run can be found in:
78 error C:\\Users\\z00441xk\\AppData\\Local\\npm-cache_logs\\2022-12-08T09_01_48_742Z-debug-0.log
After some research I've ended up to try and remove node_modules and add it again. However I cannot remove it and I get the following message:
*z00441xk#md3n4gkc MINGW64 ~/Documentos/Samuel/Documento Pessoais/Node.js/Secrets (master)
$ rm -rf node_modules
rm: cannot remove 'node_modules/#aws-sdk/credential-provider-sso': Input/output error*
Finally I've been installing rimraf (npm install rimraf -g) and using the command "$ rimraf node_modules" as well as "$ npx rimraf node_modules", "$ npm cache clean --force", but unfortunately I've got the following message from both attempts from terminal:
z00441xk#md3n4gkc MINGW64 ~/Documentos/Samuel/Documento Pessoais/Node.js/Secrets (master)
$ npx rimraf node_modules
C:\Users\z00441xk\AppData\Roaming\npm\node_modules\rimraf\bin.js:46
throw er
^
[Error: UNKNOWN: unknown error, unlink 'C:\Users\z00441xk\Documentos\Samuel\Documento Pessoais\Node.js\Secrets\node_modules\#aws-sdk\credential-provider-sso'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'unlink',
path: 'C:\\Users\\z00441xk\\Documentos\\Samuel\\Documento Pessoais\\Node.js\\Secrets\\node_modules\\#aws-sdk\\credential-provider-sso'
}
Node.js v18.12.0
Has anyone experienced this before or know what is causing this?
Thank you very much for your cooperation!

Can't install from NPM anymore - Suddenly getting weird FETCH_ERROR - invalid json response body at

I can't install anything with npm anymore. The weird part is it started happening on both my computers at the same time, both get the same error.
I get the following error and it does not matter what npm package i try to install. It's the same for all.
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'
I've tried to reinstall, clear the cache. I followed this answer: https://www.reddit.com/r/npm/comments/v9m08x/npm_err_code_ebusy/
Nothing works. Anybody got an idea what could be causing this?
Full error from log:
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
Well for anybody else that might stumble upon this. It was my antivirus. Even though i thought i killed it, there we still processes running in the background, which apparently locked the files that npm was creating in the temp folder

npm init #eslint/config error & npx create-react-app . error

When i try to init a eslint config file for my node project with npm init #eslint/config. below is the error i am getting, I tried to downgrade node versio, upgrade npm to latest version, clear node cache nothing worked out.
Tried to google and could'nt find anything to this particular issue.
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Users\\sakth\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'init',
0 verbose cli '#eslint/config'
0 verbose cli ]
1 info using npm#8.5.3
2 info using node#v16.14.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Users\sakth\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\Projects\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\sakth\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\sakth\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 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:setTitle Completed in 1ms
21 timing config:load:flatten Completed in 3ms
22 timing npm:load:display Completed in 5ms
23 verbose logfile C:\Users\sakth\AppData\Local\npm-cache\_logs\2022-03-08T16_30_49_917Z-debug-0.log
24 timing npm:load:logFile Completed in 36ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 53ms
28 silly logfile start cleaning logs, removing 4 files
29 http fetch GET 200 https://registry.npmjs.org/#eslint%2fcreate-config 2465ms (cache revalidated)
30 timing arborist:ctor Completed in 1ms
31 timing arborist:ctor Completed in 0ms
32 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/acorn-jsx
33 timing command:init Completed in 2618ms
34 verbose stack Error: command failed
34 verbose stack at ChildProcess.<anonymous> (C:\Users\sakth\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
34 verbose stack at ChildProcess.emit (node:events:520:28)
34 verbose stack at maybeClose (node:internal/child_process:1092:16)
34 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
35 verbose cwd D:\Projects
36 verbose Windows_NT 10.0.19044
37 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sakth\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "init" "#eslint/config"
38 verbose node v16.14.0
39 verbose npm v8.5.3
40 error code 1
41 error path D:\Projects
42 error command failed
43 error command C:\Windows\system32\cmd.exe /d /s /c create-config
44 verbose exit 1
45 timing npm Completed in 3315ms
46 verbose code 1
47 error A complete log of this run can be found in:
47 error C:\Users\sakth\AppData\Local\npm-cache\_logs\2022-03-08T16_30_49_917Z-debug-0.log
And for npx create-react-app .
'create-react-app' is not recognized as an internal or external command,
operable program or batch file.
are you using the newer npx command for create-react-app? from the docs :
npx create-react-app my-app cd my-app npm start
If you've previously installed create-react-app globally via npm
install -g create-react-app, we recommend you uninstall the package
using npm uninstall -g create-react-app or yarn global remove
create-react-app to ensure that npx always uses the latest version.

Node Error "unable to resolve dependency tree" while installing tailwindcss --auth

I tried to install Tailwind UI Auth with php artisan ui tailwindcss --auth command. Both CSS Scaffolding and CSS auth Scaffolding were installed successfully and I ran the command npm install && npm run dev to compile the fresh scaffolding. NPM installation happend but in the dev process of the command, the app was not properly compiled. The error log as follows;
> 0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'install'
0 verbose cli ]
1 info using npm#7.11.2
2 info using node#v16.1.0
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:E:\Google Drive\laravel_training\secondproject\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\Charles-MS\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\Charles-MS\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 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 14ms
19 timing npm:load:configload Completed in 14ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 22ms
26 timing config:load:flatten Completed in 4ms
27 timing arborist:ctor Completed in 4ms
28 timing idealTree:init Completed in 1291ms
29 timing idealTree:userRequests Completed in 0ms
30 silly idealTree buildDeps
31 silly fetch manifest #tailwindcss/ui#^0.3
32 http fetch GET 304 https://registry.npmjs.org/#tailwindcss%2fui 3735ms (from cache)
33 silly fetch manifest tailwindcss#^2.1.2
34 http fetch GET 200 https://registry.npmjs.org/tailwindcss 708ms
35 silly fetch manifest tailwindcss#^1.3.3
36 silly fetch manifest autoprefixer#^9.6
37 http fetch GET 304 https://registry.npmjs.org/autoprefixer 256ms (from cache)
38 silly fetch manifest autoprefixer#^10.0.2
39 timing idealTree Completed in 6018ms
40 timing command:install Completed in 6032ms
41 verbose stack Error: unable to resolve dependency tree
41 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1221:25)
41 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1188:34)
41 verbose stack at async Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1175:23)
41 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:892:11)
41 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7)
41 verbose stack at async Promise.all (index 1)
41 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\reify.js:135:5)
41 verbose stack at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:137:5)
42 verbose cwd E:\Google Drive\laravel_training\secondproject
43 verbose Windows_NT 10.0.19042
44 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
45 verbose node v16.1.0
46 verbose npm v7.11.2
47 error code ERESOLVE
48 error ERESOLVE unable to resolve dependency tree
49 error
50 error While resolving: [1mundefined[22m#[1mundefined[22m
50 error Found: [1mautoprefixer[22m#[1m9.8.6[22m[2m[22m
50 error [2mnode_modules/autoprefixer[22m
50 error [33mdev[39m [1mautoprefixer[22m#"[1m^9.6[22m" from the root project
50 error
50 error Could not resolve dependency:
50 error [35mpeer[39m [1mautoprefixer[22m#"[1m^10.0.2[22m" from [1mtailwindcss[22m#[1m2.1.2[22m[2m[22m
50 error [2mnode_modules/tailwindcss[22m
50 error [1mtailwindcss[22m#"[1m^2.1.2[22m" from the root project
50 error
50 error Fix the upstream dependency conflict, or retry
50 error this command with --force, or --legacy-peer-deps
50 error to accept an incorrect (and potentially broken) dependency resolution.
50 error
50 error See C:\Users\Charles-MS\AppData\Local\npm-cache\eresolve-report.txt for a full report.
51 verbose exit 1
How to overcome this error? Even I updated node to latest version (v16.1.0) but coudn't fix the error...
The following solution worked for me;
Run the command npm audit fix --force which updates laravel-mix to 6.0.19, a SemVer major change. Then run npm run dev which will successfully compile the webpack. This error occurs due to an outdated laravel-mix package.

Resources