vue-cli · Failed to download repo vuejs-templates/webpack: unable to verify the first certificate
时间: 2024-01-19 08:39:34 浏览: 124
快速解决vue-cli不能初始化webpack模板的问题
5星 · 资源好评率100%
这个错误是由于在创建vue项目时无法验证第一个证书导致的。解决这个问题的方法有几种。一种方法是修改vue-cli的源代码,可以按照引用中提到的方法,在vue-cli\node_modules\download\index.js文件中将rejectUnauthorized: process.env.npm_config_strict_ssl !== 'false'这一行改为rejectUnauthorized: false。另一种方法是通过离线创建项目。可以按照引***也可以使用提供的百度网盘链接进行下载。下载完成后,将解压后的文件夹重命名为.vue-templates,并在创建项目时使用--offline参数来指定离线创建。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue-cli · Failed to download repo vuejs-templates/webpack: unable to verify the first certificate](https://blog.csdn.net/DDJ_TEST/article/details/124298618)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [vue-cli · Failed to download repo vuejs-templates/webpack:unable to verify the first certificate](https://blog.csdn.net/m0_53692627/article/details/130779468)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [vue-cli Failed to download repo vuejs-templates/webpack解决办法](https://blog.csdn.net/qq_45731083/article/details/114921816)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文