curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash
nvm install 16 ## 需要重新打开terminal 运行
nvm use 16
nvm alias default 16
npm install npm --global # Upgrade npm to the latest version
坑 1 如果你是 mac 电脑,已经安装了 npm ,注意先卸载再安装 nvm 原因参考下述链接
坑 2 gt push nvm 到本地出现 Git — SSL_ERROR_SYSCALL,解决方法如下
git — fatal: unable to access ‘https://github.com/xxx’: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 — Stack Overflowt — SSL_ERROR_SYSCALL 问题解决 | Hyperzsb’s Ideas](https://blog.hyperzsb.tech/git-ssl-error/)
坑 3 node 版本过高出现’ERR_OSSL_EVP_UNSUPPORTED’,解决方法如下(就是安装 node 16 就行了🥲)
mkdir my-wave-portal
cd my-wave-portal
npm init -y
npm install --save-dev hardhat
npx hardhat ## Choose the option to create a sample project. Say yes to everything.
npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers ## Go ahead and install these other dependencies just in case it didn't do it automatically.
npx hardhat accounts


npx hardhat compile
npx hardhat test

Go ahead and delete the file sample-test.js under test. Also, delete sample-script.js under scripts. Then, delete Greeter.sol under contracts. Don’t delete the actual folders!

这一课是在电脑本地安装你的 ETH 编程环境,你需要安装 git,nvm,node 和 hardhat,这一课我踩了不少坑,如果你网好,没有选择错,或许你会比我顺利。对了,如果你安装 nvm 和 hardhat 中遇到了问题,或者无法卸载 node,直接删除 nvm,node 的文件夹重新安装即可。
