web3 / web3.js

Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.
https://web3js.org/
Other
19.31k stars 4.95k forks source link

Web3.js returns "Cannot find module 'web3-requestManager'" #966

Closed guidosegni closed 7 years ago

guidosegni commented 7 years ago

Using node 6.11.1 on a macosx

I installed web3 with the following command:

npm install web3

Then i launch this - apparently - simple node command:

Web3 = require('web3');

Well, it returns the following error:

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)

it looks like it require some module (e.g. 'web3-requestManager') that aren't installed with the package.

Any Idea? Am i doing something wrong?

dconroy commented 5 years ago

how do we get "npm audit fix" not default to deprecated versions of web3?

Kishanjvaghela commented 5 years ago

@cosminstefanxp I had same problem with web and firebase.. this is worked for me

tvance929 commented 5 years ago

@Kishanjvaghela - that was it for me! My package had a github address for web3... i replaced it with your version then followed your steps and Im up. Thanks so much!