脚手架初始化失败
Connect timeout for 5000ms, GET https://registry.npmjs.org/egg-boilerplate-simple/latest -2 (connected: false, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
解决方案
1.在安装egg.js的脚手架工具时,使用淘宝镜像
- node版本8.6以上
- npm config set registry https://registry.npm.taobao.org -global
- npm i egg-init -g
- egg-init egg --type=simple
- 通过错误得出连接不上官方镜像库,连接超时
- npm set timeout 1000000 -global
- mkdir egg-test
- cd /egg-test
- npm init egg --type=simple