小编Tra*_*der的帖子

如何修复错误 - nodemon.ps1 无法加载,因为在此系统上禁用了运行脚本,(没有安全风险)?

终端错误:无法加载 nodemon.ps1,因为在此系统上禁用了运行脚本。有关详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 上的 about_Execution_Policies。

我有一个通过这种方式解决问题的解决方案

  1. 以管理员身份打开 Windows PowerShell
  2. 运行此命令:Set-ExecutionPolicy Unrestricted

这解决了问题,但这样系统会显示安全风险警告。我的问题:有没有其他方法可以在没有安全风险的情况下解决这个问题?目标是使用 nodemon。

powershell web-development-server node.js nodemon visual-studio-code

46
推荐指数
9
解决办法
6万
查看次数