truffle初始化的坑有很多:
truffle init报错:Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn’t exist. If you believe this is an error, please contact Truffle support.
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-mWI7p9Ii-1599058074408)(http://xwjpics.gumptlu.work/qiniu_picGo/20200823195443.png)]
解决方法:git clone https://github.com/truffle-box/bare-box然后进入bare-box:cd bare-box
可以看到我们需要的初始化的内容已经都在里面了。继续working。
truffle unbox webpack初始化时:Truffle Box at URL https://github.com/truffle-box/webpack-box doesn’t exist.
或者:
解决方法:同样的,使用另一种方法来unbox这个项目
git clone https://github.com/trufflesuite/truffle-init-webpack.git
$ cd truffle-init-webpack
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-blvW7Vmw-1599058074418)(http://xwjpics.gumptlu.work/qiniu_picGo/20200902215403.png)]
就一样啦。