npm hangs on any command

后端 未结 6 1084
庸人自扰
庸人自扰 2021-01-01 20:01

I installed last version of Node.js (12.2 x64 windows) After I run cmd as administrator and try to call any npm command (except npm -v

6条回答
  •  一向
    一向 (楼主)
    2021-01-01 20:26

    It's if the prefix is not set correctly.

    Just want to point out to those commenting -if you can't get access to the command line npm, then you can't run npm config, obviously.

    Open up powershell and type notepad $HOME/.npmrc, and edit the line where it says prefix=... and change it to a valid one.

提交回复
热议问题