wepy init standard 报错:Download template failed unable to verify the first certificate,已经解决

$wepy init 报错:

vagrant@homestead:~/Code/larabbs1$ npm install @wepy/cli -g 
报错:
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2020-07-19T15_20_13_849Z-debug.log

之后按照以下命令行,成功安装:
vagrant@homestead:~/Code/larabbs1$ sudo npm install @wepy/cli -g --unsafe-perm=true --allow-root 
......

+ @wepy/cli@2.1.0
updated 1 package in 41.415s
vagrant@homestead:~/Code/larabbs1$ wepy -v
2.1.0

后面wepy init初始化报错:
vagrant@homestead:~/Code/larabbs1$ wepy init standard#2.1.0 ./
? Target directory exists. Continue? Yes
[15:47:30] ERR! Download template failed
[15:47:30] ERR! unable to verify the first certificate

问题已经解决

将命令行由$ wepy init standard#2.1.0 ./改为$ wepy init standard#2.0.x ./即可(我用2.1.0是因为$wepy -v后版本显示为2.1.0,到官网wepy-templates的github下载后发现版本是2.0.x)

vagrant@homestead:~/Code/larabbs1$ wepy init standard#2.0.x ./
? Target directory exists. Continue? Yes
[01:10:38] WARN Download from Github raw failed, try Tencent COS download
[01:10:38] WARN unable to verify the first certificate

fatal: bad config line 6 in file /home/vagrant/.gitconfig
? Project name larabbs
? AppId 你自己的AppID(小程序ID)
? Project description A WePY project
? Author yourname <youremail@xx.com>
? Use ESLint to lint your code? Yes
? Choose a state container Vuex

[01:16:19] info Generated "./".
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!