学习自:https://blog.csdn.net/CHYabc123456hh/article/details/107736640
今天进行truffle unbox react创建空项目工程总是失败,查阅了相关博主的解决方法后成功解决了问题,上错误消息:
× Downloading
Unbox failed!
× Downloading
Unbox failed!
RequestError: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: raw.githubusercontent.com. is not in the cert's altnames: DNS:default.ssl.fastly.net, DNS:fastly.com, DNS:*.a.
ssl.fastly.net, DNS:*.hosts.fastly.net, DNS:*.global.ssl.fastly.net, DNS:*.fastly.com, DNS:a.ssl.fastly.net, DNS:purge.fastly.net, DNS:mirrors.fastly.net, DNS:control.fastly.net, DNS:tools.fastly.net
at new RequestError (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\errors.js:14:1)
at Request.plumbing.callback (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:87:1)
at Request.RP$callback [as _callback] (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-core\lib\plumbing.js:46:1)
at self.callback (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
at Request.emit (events.js:315:20)
at Request.onRequestError (C:\Users\Administrator\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315: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.41 (core: 5.1.41)
Node v12.18.3
【windows中truffle unbox react失败总结】发现需要修改host文件配置,分享该hosts文件,将其放于C:\Windows\System32\drivers\etc中覆盖原有hosts文件就ok了,下附hosts文件。
https://pan.baidu.com/s/11jwivgE1uz-5GgkVHGmhHg
提取码:r5sb
覆盖后成功安装
? Proceed anyway? Yes
√ Preparing to download box
√ Downloading
√ Cleaning up temporary files
√ Setting up boxUnbox successful, sweet!Commands:Compile:truffle compile
Migrate:truffle migrate
Test contracts:truffle test
Test dapp:cd client && npm test
Run dev server:cd client && npm run start
Build for production: cd client && npm run build
推荐阅读
- 推动NFT走出监管困境,BSN推出支持NFT基础设施网络
- 腾讯|SaaS的收入模型有哪些(终于有人讲明白了)
- 就业方向上什么才是最重要的(--- 来自程序猿的迷茫。(C++?Java?or算法?))
- 区块链中加密货币的含义
- 波场万倍潜力币HYL23号21:09分 正式上线JustSwap
- 《瀚兰房地产开发区块链应用及案例分享》BSN培训精华回顾
- 对联盟链而言,跨链协议为什么重要()
- 区块链能够应用在哪些行业
- BSN区块链服务网络中密钥托管模式和公钥上传模式有啥区别()
- 币圈人物传|币圈大佬今何在 唯有一诺正当时