无法执行vue初始化命令

2019-10-30  本文已影响0人  哈哈乐乐WXT

今天vue 初始化项目时提示错误
执行命令:

vue : 无法加载文件 C:\Users\36910\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息
,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ vue init webpack-simple myFirstDemo
+ ~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

网上搜索了一下原因,解决(参照以下方式解决)

原因:在此系统禁止运行脚本,这是笔记本禁止运行脚本,
解决办法:
1.管理员身份打开

2 image

3.输入set-ExecutionPolicy RemoteSigned

image

4.选择Y 或者A ,就好了

参考地址:
https://blog.csdn.net/wqnmlgbsz/article/details/100654258

上一篇 下一篇

猜你喜欢

热点阅读