我在VSC中设计网站,而PowerShell是我的默认终端。
在较早地将网站更新和部署到firebase之后,系统提示我更新firebase工具-我使用npm做了。在出现以下错误之后,我无法立即运行/访问任何firebase脚本后:
firebase : File C:\Users\mada7\AppData\Roaming\npm\firebase.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1
firebase
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
我花了几个小时四处搜寻,却找不到可靠的答案。许多线程已经使用了好几年了,我觉得很奇怪,在过去的一年中直到今天我都没有遇到过这个问题。如果将默认终端设置为cmd,我仍然可以访问firebase脚本。
假设问题与我一直在使用的firebase-tools有关,但是现在更新了vue.js并在尝试在Powershell中运行任何vue命令时再次出现错误:
vue : File C:\Users\mada7\AppData\Roaming\npm\vue.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1
vue
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
VSCode Version: …