在使用npm 安装了http-server 后,在相应的目录下执行http-server 命令,弹出以下错误。
http-server : 无法加载文件 E:nodejs\node_global\http-server.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
解决方案:
输入 set-ExecutionPolicy RemoteSigned
输入 Y
******************************************************************
至此在执行http-server ,就可以了。ohyeah.