先安裝node.js,在安裝cnpm
然后打開vs code 輸入命令 cnpm install
背景:使用npm下載時,出現錯誤Unexpected end of JSON input while parsing near···
解決方法:先清除緩存,再重新安裝
清除緩存:運行
npm cache clean --force
重新安裝:
npm install
如果輸入命令報錯

還報錯,輸入命令 set-ExecutionPolicy RemoteSigned
安裝cnpm npm install -g cnpm -registry=https://registry.npm.taobao.org
參考博客
安裝 node:https://www.cnblogs.com/uniapp/p/13115877.html
npm -v 報錯,修改安裝位置的文件權限給全部
安裝cnpm:https://www.cnblogs.com/zhouyu2017/p/6485265.html
