Umb*_*nca 9 javascript node.js ethereum web3js
我正在尝试在macosx上开始使用带有节点6.11.1的Ethereum Web3.js
我使用以下命令安装了web3:
npm安装web3
然后我启动这个 - 显然 - 简单的节点命令:
Web3 = require('web3');
好吧,它返回以下错误:
module.js:471
throw err;
^
Error: Cannot find module 'web3-requestManager'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/fremente/Dropbox/Influx Design/Web htdocs/ethereum/node_modules/web3/packages/web3-core/src/index.js:26:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Run Code Online (Sandbox Code Playgroud)
看起来它需要一些未随包安装的模块(例如'web3-requestManager').
这是我的package.json
{
"name": "ethereum",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"ethereumjs-testrpc": "^4.0.1",
"solc": "^0.4.13",
"web3": "^1.0.0-beta2"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Run Code Online (Sandbox Code Playgroud)
任何的想法?难道我做错了什么?
问题来自于使用测试版的web3,目前还不稳定,目前正处于大量开发阶段,你有两种选择之一,
使用稳定版本0.23我认为或类似的东西
或手动安装所有需要的依赖项我不推荐这个解决方案用于稳定的dapp,因为目前事情确实很不稳定
归档时间: |
|
查看次数: |
6263 次 |
最近记录: |