Warm tip: This article is reproduced from serverfault.com, please click

Cannot destructure property 'name' of 'node' as it is null

发布于 2021-01-14 17:49:44

when I want to install dependencies of the aurelia project, got this error:

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/ehsanghaffarii/.nvm/versions/node/v15.5.1/bin/node /Users/ehsanghaffarii/.nvm/versions/node/v15.5.1/lib/node_modules/npm/bin/npm-cli.js install --cache=/Users/ehsanghaffarii/.npm/_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm ERR! code ERESOLVE
npm ERR! npm ERR! Cannot destructure property 'name' of 'node' as it is null.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/ehsanghaffarii/.npm/_cacache/_logs/2021-01-14T17_17_22_767Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ehsanghaffarii/.npm/_logs/2021-01-14T17_19_13_263Z-debug.log

How can fix this?

Node v15.5.1

npm v7.3.0

Questioner
Ehsan Ghaffarii
Viewed
0
Reborn 2021-01-15 03:16:19

It appears to me and this GitHub thread that you are trying to install global dependencies which require elevated permissions and/or npm package version is bugged. Make sure you have sufficient rights to downgrade npm to the earliest version.

Please let me know, if that solved your problem.