vue init失败解决方案-终极版

简单来说就是

1.在https://github.com/vuejs-templates/下载相应的模板

2.把解压出的文件夹放在 C:\Users\Administrator\.vue-templates 

没有就新建一个 .vue-templates 

新建失败的话,记得要在后面加一个点 .vue-templates.

3.安装了vue-cli之后进行初始化项目 vue init webpack-simple project --offline 

记得后面加 --offline 才能离线安装


由于windows系统的某方面问题,vue脚手架安装可能会出现第一证书丢失


// 报错:vue-cli · Failed to download repo vuejs-templates/webpack-simple: unable to verify the first certificate


//简单一点,你也可以直接去github下载对应的模板(template), 然后windows+r,cmd,


vue init webpack-simple project --offline


//project是项目名称


//在https://github.com/vuejs-templates/下载(看不懂英文直接点Clone or Download 里的 Download ZIP)。


//下载webpack-simple 或 webpack.这里建议webpack-simple。因为webpack有坑。解决方案后续再更吧= =。类似严格模式(类似!!!!),多一个空格都报错的那种恶心东西


//把解压出的文件夹放在


//C:\Users\Administrator\.vue-templates


//Administrator写你的用户名


//没有就新建一个 .vue-templates 要在后面加点 .vue-templates.


vue init webpack-simple project --offline

猜你喜欢

转载自blog.csdn.net/u010598111/article/details/80561840