node報(bào)錯(cuò):vscode報(bào)錯(cuò)rimraf : 無(wú)法加載文件 C:\Users\*****\*****\*****\npm\rimraf.ps1,因?yàn)樵诖讼到y(tǒng)上禁止運(yùn)行腳本。
在使用rimraf刪除 node_modules命令的時(shí)候,vscode報(bào)錯(cuò)rimraf : 無(wú)法加載文件 C:\Users\*****\*****\*****\npm\rimraf.ps1,因?yàn)樵诖讼到y(tǒng)上禁止運(yùn)行腳本。
解決方法:
1.以管理員身份運(yùn)行Windows Powershell
windows的搜索功能搜 Windows Powershell
2.執(zhí)行: 1 get-ExecutionPolicy ,顯示Restricted,表示狀態(tài)是禁止的;
3.執(zhí)行: 1 set-ExecutionPolicy RemoteSigned ;
4.再執(zhí)行 1 get-ExecutionPolicy ,就顯示RemoteSigned;
下面是所有流程:
posted on 2021-06-01 14:41 Wellspring 閱讀(1145) 評(píng)論(0) 收藏 舉報(bào)
浙公網(wǎng)安備 33010602011771號(hào)