E403 npm ERR! 403 403 Forbidden

安装包时出现

E403

npm ERR! 403 403 Forbidden - GET xxx(网址)

npm ERR! 403 In most cases, you or one of your dependencies are requesting

npm ERR! 403 a package version that is forbidden by your security policy.

问题:仓库位置不对

解决:

修改仓库位置到npm官网

查看仓库列表 有*的是当前仓库: nrm ls

切换仓库到npm:npm config set registry https://registry.npmjs.org/ 

切换后就可以重新安装完成了

 

posted @ 2022-04-08 15:05  诚实村诚实人  阅读(1905)  评论(0)    收藏  举报