vue-cli · Failed to download repo vuejs-templates/webpack: self signed certificate in certificate chain
2018-09-13 13:58
211 查看
vue init webpack <Project name>
报错:
vue-cli · Failed to download repo vuejs-templates/webpack: self signed certificate in certificate chain
由于ssl证书问题,可绕过验证
步骤如下:
文件夹
C:\Users\<UserName>\AppData\Roaming\npm\node_modules\vue-cli\node_modules\download
打开index.js
module.exports = (uri, output, opts) => { if (typeof output === 'object') { opts = output; output = null; } opts = Object.assign({ encoding: null, // rejectUnauthorized: process.env.npm_config_strict_ssl !== 'false' rejectUnauthorized: false }, opts); let protocol = url.parse(uri).protocol; if (protocol) { protocol = protocol.slice(0, -1); } const agent = caw(opts.proxy, { protocol }); const stream = got.stream(uri, Object.assign(opts, { agent })); const dest = output ? path.join(output, filenamify(path.basename(uri))) : null; const promise = createPromise(uri, dest, stream, opts); stream.then = promise.then.bind(promise); stream.catch = promise.catch.bind(promise); return stream; };
注释
rejectUnauthorized: process.env.npm_config_strict_ssl !== 'false'
修改为
rejectUnauthorized: false
重新运行init 问题解决
相关文章推荐
- Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,
- Failed to download repo vuejs-templates/webpack-simple: tunneling socket could not be........
- vue-cli · Failed to download repo vuejs-templates/webpack-simple: connect ECONNREFUSED 12.0.0.1:443
- vue-cli Failed to download repo vuejs-templates/webapck: Response code 404 (Not Found)
- vue-li安装失败Failed to download repo vuejs-templates/webapck-simple: Response code 404 (Not Found)
- vue-cli · Failed to download repo vuejs-templates?
- git clone出现fatal: unable to access 'https://': SSL certificate problem: self signed certificate in c
- webpack打包vue文件报错:ERROR in ./src/App.vue 1:0 Module parse failed: Unexpected token (1:0) You may need
- jenkins 使用Git 报错:SSL certificate problem: self signed certificate in certificate chain
- How to Create a Self Signed Certificate in IIS 7& Chrome setting
- Webpack报错:ERROR in ./client/app.js Module parse failed: Unexpected token (5:16) You may need an appr
- webpack---Error in app.js ;Module build failed :SyntaxError ../app.js : unpexted token <7:8> 对'<'报错
- pyspider HTTP 599: SSL certificate problem: self signed certificate in certificate chain解决方法
- git clone出现fatal: unable to access 'https://': SSL certificate problem: self signed certificate in
- Android - WebView 加载 Https 出现 SSL Error. Failed to validate the certificate chain
- vue-cli&webpack&arcgis API For JS的天坑之路(一)
- 初始化nodejs+webpack+vuejs
- 对vue中 默认的 config/index.js:配置的详细理解 -【以及webpack配置的理解】-config配置的目的都是为了服务webpack的配置,给不同的编译条件提供配置
- eggjs 框架代理调试 SELF_SIGNED_CERT_IN_CHAIN 报错解决方案
- vue 中改变 webpack.base.config.js无效的问题