web3无法安装的额解决方案-----yarn命令安装web3

凡是可以用 JavaScript 来写的应用,最终都会用 JavaScript 来写。
——Atwood定律(Jeff Atwood在2007年提出)

yarn命令详解
https://yarnpkg.com/en/docs/cli/add
yarn & npm 常用命令比较
npm install === yarn / yarn install
npm install xxx —save === yarn add xxx
npm uninstall xxx —save === yarn remove xxx
npm install xxx —save-dev === yarn add xxx —dev
npm update === yarn upgrade
npm install xxx -g === yarn global add xxx

1.安装web3
安装方式1: Npm i -g yarn
安装方式2: window下载msi,linux 和 mac 上使用 shell 指令来安装(依赖Node)

2.yarn原仓库非常不稳定 设置yarn 仓库地址
yarn config set registry https://registry.npm.taobao.org

3.npm install --global --production windows-build-tools

4.npm install -g node-gyp

////////https://blog.csdn.net/kingmax54212008/article/details/73135510

/////https://stackoverflow.com/questions/32964144/gyp-err-stack-error-c-program-files-x86-msbuild-12-0-bin-msbuild-exe-fail

猜你喜欢

转载自www.cnblogs.com/xiaocongcong888/p/9399995.html