npm安装vuecli出错的处理方法

npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

第一步:先把360和杀毒软件关闭。

第二步:以管理员模式运行cmd.exe。

第三步(上面两步不行的情况下使用):node安装目录下设置users用户完全控制权限
1.找到电脑中node.js的安装文件夹,右键选择属性,点击安全,选择Users用户,点击编辑

2.勾选User的权限下”完全控制“权限的允许对勾,点击确定,退出。

安装成功提示如下:

+ @vue/[email protected]
added 835 packages from 492 contributors in 166.927s

安装完成后,使用vue -V,出现不是内部或理外部命令

将D:\nodejs安装目录加入环境变量即可

找到path目录,end键到最后,加上;D:\nodejs,保存

加好后,重新打开cmd运行即可。

猜你喜欢

转载自blog.csdn.net/tiging/article/details/128070875
今日推荐