繁体   English   中英

node.js 实时服务器无法启动管理错误

[英]node.js live server not booting admin error

每当我尝试在视觉代码工作室 node.js 上启动服务器时,都会一直给我这个错误。 我尝试在管理员上运行它,但它仍然给我同样的错误。 任何人都可以对此有所了解吗?

PS C:\Users\amire\OneDrive\Desktop\javascript> live-server
live-server : File C:\Users\amire\AppData\Roaming\npm\live-server.ps1 cannot be loaded. The file C:\Users\amire\AppData\Roaming\npm\live-server.ps1 is not 
digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see 
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ live-server
+ ~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

这可能是因为在您的系统中禁用了运行脚本,您需要将执行策略设置为无限制。 按着这些次序:

  1. 以管理员身份打开 Powershell: Windows+r ,然后输入powershellctrl+shift+enter

  2. 然后在 PowerShell 中输入这个并按回车: set-ExecutionPolicy Unrestricted

  3. Select ' [A] Yes to All ': 输入a并回车

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM