macOS Catalina Nodejs12配置truffle和drizzle的开发环境

➜  ~ node -v
v12.18.4
➜  ~ npm -v
6.14.6
➜  ~ npm install -g truffle
➜  ~ truffle version
Truffle v5.1.53 (core: 5.1.53)
Solidity v0.5.16 (solc-js)
Node v12.18.4
Web3.js v1.2.9
➜  ~ mkdir node1218
➜  ~ cd node1218
➜  node1218 truffle init
➜  node1218 npx create-react-app client
➜  node1218 cd client
➜  client npm install github:barrysteyn/node-scrypt#fb60a8d3c158fe115a624b5ffa7480f3a24b03fb //这句话最重要,scrypt太坑了
➜  client npm install drizzle drizzle-react drizzle-react-components

drizzle官网上的安装步骤根本就不行,因为Nodejs的版本是不一样的。原来我的Node是最新的14版本,后来发现drizzle根本装不成,无奈把node.js换成v12.18.4,发现还是不行。仔细看了编译出错的问题后,发现是scrypt的问题,npm出错提示为:

gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sc

猜你喜欢

转载自blog.csdn.net/ursamjnor/article/details/109803975
今日推荐