我正在尝试在我的 Windows 10 机器上开发一个反应原生项目。我通过visual studio代码终端安装了node js然后expo cli。然后我尝试了命令 expo --version
,终端显示错误::
expo : File C:\Users\saka\AppData\Roaming\npm\expo.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
+ expo --version
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
给定的链接显示了很多东西,但是我该怎么做才能解决我的问题?谢谢你!!!
原文由 user4221591 发布,翻译遵循 CC BY-SA 4.0 许可协议
只需尝试以管理员身份打开 Windows PowerShell,然后运行以下命令行: