【发布时间】:2018-08-26 09:53:27
【问题描述】:
在 web3 版本 1.x 文档中:https://web3js.readthedocs.io/en/1.0/getting-started.html 它说安装 web 3 使用
npm install web3
但这会安装 0.2x.00 版。
那我该怎么办?
【问题讨论】:
在 web3 版本 1.x 文档中:https://web3js.readthedocs.io/en/1.0/getting-started.html 它说安装 web 3 使用
npm install web3
但这会安装 0.2x.00 版。
那我该怎么办?
【问题讨论】:
直接使用 1.0 分支从 github repo 安装:
npm install git+https://github.com/ethereum/web3.js.git\#1.0ES6
编辑:将示例安装添加到新项目目录中。
$ npm install git+https://github.com/ethereum/web3.js.git\#1.0ES6
> web3@1.0.0-beta.24 postinstall C:\cygwin\home\adamk\eth\web3-1.0\node_modules\web3
> lerna bootstrap
lerna info version 2.9.0
lerna info Bootstrapping 20 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle postinstall
lerna info lifecycle prepublish
lerna info lifecycle prepare
lerna success Bootstrapped 20 packages
npm WARN saveError ENOENT: no such file or directory, open 'C:\cygwin\home\adamk\eth\web3-1.0\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\cygwin\home\adamk\eth\web3-1.0\package.json'
npm WARN web3-1.0 No description
npm WARN web3-1.0 No repository field.
npm WARN web3-1.0 No README data
npm WARN web3-1.0 No license field.
+ web3@1.0.0-beta.24
added 1 package in 65.026s
【讨论】:
npm install -g lerna
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe 失败,退出代码:1 lerna ERR!吉普错误! ChildProcess.onExit 处的堆栈