會報這樣的錯誤提示
解決思路:
1、vscode用管理員打開 (非必須)
2、設置策略
打開 windows powerShell . 輸入命令 set-ExecutionPolicy RemoteSigned 然后 Y .
查看是否設置成功 get-executionpolicy
3、下載總是超時,設置鏡像源
查看鏡像源
npm config get registry
yarn config get registry
設置鏡像源
npm config set registry https://registry.npmmirror.com
yarn config set registry https://registry.npmmirror.com
查看配置
npm config list
yarn config list