asus1@asus MINGW64 /d/windows-share/pet-shop-tutorial
$ truffle unbox webpack
Starting unbox…
- Preparing to download box
√ Preparing to download box - Downloading
× Downloading
Unbox failed!
× Downloading
Unbox failed!
RequestError: Error: getaddrinfo ENOENT raw.githubusercontent.com
at new RequestError (D:\nodejs\node_global\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\errors.js:14:1)
at Request.plumbing.callback (D:\nodejs\node_global\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:87:1)
at Request.RP$callback [as _callback] (D:\nodejs\node_global\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:46:1)
at self.callback (D:\nodejs\node_global\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
at Request.emit (events.js:310:20)
at Request.onRequestError (D:\nodejs\node_global\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
at ClientRequest.emit (events.js:310:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Truffle v5.1.27 (core: 5.1.27)
Node v12.16.3
已解决:
修改hosts文件
加上raw.githubusercontent.com的ip