运行js提示 “因为在此系统上禁止运行脚本”

windows、node环境:

以管理员身份运行 powershell,输入

get-ExecutionPolicy

如提示Restricted,表明状态是禁止运行js的

解决,运行下面这条命令解决:

set-ExecutionPolicy RemoteSigned

再次运行 get-ExecutionPolicy 提示 RemoteSigned 就可以了。


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 6 =