Tôi đang cố gắng để bắt đầu sử dụng Ethereum Web3.js với nút 6.11.1 trên macosxEthereum Web3.js trả "Không thể tìm thấy mô-đun 'web3-requestManager"
Tôi đã cài đặt web3 với lệnh sau đây:
npm install web3
sau đó, tôi khởi động này - rõ ràng - lệnh nút đơn giản:
Web3 = require('web3');
Vâng, nó sẽ trả về lỗi sau:
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)
có vẻ như nó yêu cầu một số mô-đun (ví dụ: 'web3-requestManager') chưa được cài đặt với gói.
Dưới đây là package.json tôi
{
"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"
}
Bất cứ ý tưởng? Tôi có làm điều gì sai?
Chỉ để hoàn thành, có sự cố mở với vấn đề này tại git repo cho thư viện: https://github.com/ethereum/web3.js/issues/966 – cyrix
Tôi đã mở vấn đề đó –
Tôi đã giải quyết cài đặt Phiên bản 0.4 –