windows环境下,在node学习时使用nodemon 报错
一、问题报错:
nodemon : 无法加载文件 C:\Users\jiahs\AppData\Roaming\npm\nodemon.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 http://go.microsoft.com/fw
link/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ nodemon
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
二、解决方式:
1.开始菜单---->右键---->windows PowerShell(管理员)
2.打开 windows PowerShell(管理员)---》输入set-ExecutionPolicy RemoteSigned ------》输入 y
3. 接下来就可以要运行nodemon了