简体   繁体   English

尝试访问 node mon 命令时出错

[英]Error while trying to access node mon command

PS C:\\Users\\पज\\Desktop\\Real time chatting application\\nodeServer> nodemon index.js PS C:\\Users\\पज\\Desktop\\实时聊天应用\\nodeServer> nodemon index.js

This is the error nodemon : File C:\\Users\\पज\\AppData\\Roaming\\npm\\nodemon.ps1 cannot be loaded because running scripts is disabled on this system.这是错误 nodemon :文件 C:\\Users\\पज\\AppData\\Roaming\\npm\\nodemon.ps1 无法加载,因为在此系统上禁用了运行脚本。 For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.有关详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 上的 about_Execution_Policies。 At line:1 char:1在行:1 字符:1

  • nodemon index.js nodemon index.js
  •  + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

To enable running scripts:要启用运行脚本:

Start Windows PowerShell with the "Run as Administrator" option.使用“以管理员身份运行”选项启动 Windows PowerShell。 Only members of the Administrators group on the computer can change the execution policy.只有计算机上管理员组的成员才能更改执行策略。

Enable running unsigned scripts by entering:通过输入启用运行未签名的脚本:

set-executionpolicy remotesigned

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

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