truffle unbox react 出坑指南

最近几天差点就被这鬼东西给逼疯了,truffle init 、truffle unbox webpack 不管我怎么运行都是对的,唯独truffle unbox react 不管在哪个windows都会报错,换了好几台电脑,心都累完了,还好我坚持了下来,找了无数方法之后,刚刚我终于找到正确的方法了! 

Error with npm install , NPM安装错误分析 按照上面的方法,执行十来分钟后,再重启cmd,运行truffle unbox react  就成功了!其实也就两条命令:

# before installing node-gyp on windows
npm install --global --production windows-build-tools

# install node-gyp globally
npm install -g node-gyp

成功效果图

猜你喜欢

转载自www.cnblogs.com/zwb121/p/8988826.html