npm 注冊淘寶鏡像


臨時使用
npm --registry https://registry.npm.taobao.org install express
1
2.持久使用
npm config set registry https://registry.npm.taobao.org
1
配置后可通過下面方式來驗證是否成功
npm config get registry

npm info express
3.通過cnpm使用
npm install -g cnpm --registry=https://registry.npm.taobao.org
1
使用
cnpm install express
4.恢復使用
npm config set registry https://registry.npmjs.org

5、解決powershell不能運行npm全局安裝的命令
使用管理員打開powershell,在c:windows下執行get-ExecutionPolicy,如果顯示的是Restricted說明他是禁止的。
接下來就要執行set-ExecutionPolicy RemoteSigned回車,輸入A 然后回車就好了。

原文鏈接:https://blog.csdn.net/quuqu/java/article/details/64121812


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM