English 中文(简体)
Cannot destructure property name of node as it is null
原标题:

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

最佳回答

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.

问题回答

you can use " yarn install" and "yarn dev"

I had same error and I added

--force

To the end of the command. works for me

you can use yarn add

  • node v14.20.0
  • npm v9.1.2
  • yarn v3.0.1




相关问题
How to make Sequelize use singular table names

I have an model called User but Sequelize looks for the table USERS whenever I am trying to save in the DB. Does anyone know how to set Sequelize to use singular table names? Thanks.

What is Node.js? [closed]

I don t fully get what Node.js is all about. Maybe it s because I am mainly a web based business application developer. What is it and what is the use of it? My understanding so far is that: The ...

Clientside going serverside with node.js

I`ve been looking for a serverside language for some time, and python got my attention somewhat. But as I already know and love javascript, I now want learn to code on the server with js and node.js. ...

Can I use jQuery with Node.js?

Is it possible to use jQuery selectors/DOM manipulation on the server-side using Node.js?

How do I escape a string for a shell command in node?

In nodejs, the only way to execute external commands is via sys.exec(cmd). I d like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a ...

热门标签