当前位置:网站首页>NPM upgrade: unable to load file c:\users\administrator\appdata\roaming\npm\npm-upgrade ps1

NPM upgrade: unable to load file c:\users\administrator\appdata\roaming\npm\npm-upgrade ps1

2022-06-11 06:26:00 Э Time walker to me

The reason is that I want to upgrade the old project package.json Dependency packages in , When I'm doing npm update Only oneortwo dependent packages are updated , Not all of them are updated .

I passed before again npm update to update package.json Dependency packages in , No problem at all , So in order to update all dependent packages , I have to do this

npm

resolvent :

  • 1) Open as administrator powershell), You cannot run as an administrator

  • 2). Run the command :set-ExecutionPolicy RemoteSigned The operation is shown in the figure below

  • 3). Run the command :set-ExecutionPolicy RemoteSigned The following screenshot appears choose : Y that will do

set-ExecutionPolicy RemoteSigned

npm
npm

It will be normal when it is executed again

npm

It should be noted that , Your project upgrade is a small version of the upgrade may have no impact on your project , Upgrade on demand , It is not recommended to upgrade the large version , For details, please refer to the corresponding documents

If the red logo appears in the following figure, you should pay attention to whether to upgrade , It depends on your use in the project

npm
npm

原网站

版权声明
本文为[Э Time walker to me]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020527312664.html