当前位置: 首页 > 后端技术 > Node.js

npm错误记录

时间:2023-04-03 14:42:10 Node.js

terminalinputvue-V报错isforbiddentorunthescriptonthissystemPSC:\Users\Administrator>vue-Vvue:ThefileD:\nodejs\node_global\vue.ps1cannotbeloadedbecause它在此系统上禁用运行脚本。有关详细信息,请参阅about_Execution_Policies,网址为https://go.microsoft.com/fwlink/?LinkID=135170。定位行:1字符:1+vue-V+~~~+CategoryInfo:SecurityError:(:)[],PSSecurityException+FullyQualifiedErrorId:UnauthorizedAccess解决方法:以管理员模式启动终端,执行命令:get-ExecutionPolicy(获取shell的当前执行策略),显示Restricted(表示状态为禁止)执行命令:set-ExecutionPolicyRemoteSigned执行命令:get-ExecutionPolicy,显示RemoteSigned,即可正常使用