truffle init发出请求时出错。请检查所请求资源的格式

时间:2017-12-06 22:05:58

标签: powershell truffle

如何解决truffle@4.0.1的问题?
我正在跑步'松露初学者'在Windows PowerShell中作为管理员,我收到此错误。如果我尝试转到浏览器中的url,我会看到一个ERR_CONNECTION_RESET页面。

PS C:\Users\UserName\desktop\Demo> truffle init
Downloading...
Error: Error making request. Please check the format of the requested resource: https://raw.githubusercontent.com/truffle-box/bare-box/master/truffle.js
    at Request._callback (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:311386:23)
    at self.callback (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:283165:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:283857:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,并发现我的浏览器屏蔽了该网址:https://raw.githubusercontent.com

我的管理员取消阻止该网址后,工作正常。