参考:http://www.4k8k.xyz/article/sinyusin/88776939

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 (/snap/truffle/2/node_modules/truffle/build/cli.bundled.js:311386:23)
    at self.callback (/snap/truffle/2/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 (/snap/truffle/2/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)

下面这部分摘自https://www.jianshu.com/p/e3ea54ed8d3a

解决方法可以是直接git代码取代truffle init命令

git clone https://github.com/truffle-box/bare-box

后续的命令需要先执行:

cd bare-box

后继续照旧

然后还是不行

接着进行更新 npm install

然后进行init即可