-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web3.js returns "Cannot find module 'web3-requestManager'" #966
Comments
I'm having the same issue apparently, when i try to install the needed file manually i get only an older version |
I am having same issue. @frozeman |
having the same issue |
It was a package renaming issue, i fixed in the latest beat.15 |
I just installed web3 today and I am also getting this issue. Is this already on npm? Getting this error:
|
Not sure what happened but the error disappeared. Maybe have something to do with metamask? After that error disappeared i couldn't get it working in metamask, but it works in Mist fine |
@jefflau any idea of what might have fixed it? Getting this issue when I install |
I forgot to publish this module. i published it, so the issue should go away. |
Truffle is and should not using the latest web3.js 1.0 beta, as its -> beta :) |
Looks like truffle-contract is looking for web3 internal packages by names no longer on the npm registry, I moved my web3 version from ^1.0.0-beta.17 to 1.0.0-beta.15, removed node_modules, and re-npm installed to fix. |
That doesn't sound like a fix, and like i wrote truffle is probably not working with web3.js 1.0.0 yet |
@frozeman I am still getting this error. |
I think I found the problem. Checkout: yarnpkg/yarn#711 Yarn doesn't handle nested |
I added this in the .bashrc NODE_PATH=${HOME}/node_modules and the problem was solved. |
@pcjose this somehow a workaround. I would like to keep all modules in my project directory. I've tried with:
And it doesn't work. Is there any clean way to tell |
Just to clear up any issues here, we haven't switched to 1.0 yet (nothing we have should be using it now, or has in the past). But we will switch once released! |
Unfortunately, I have this problem with beta18. I tried to use web3 inside an ionic app. The following errors I get:
What should I do? |
Please use Now, for webpack to work: const { lstatSync, readdirSync } = require('fs');
const { join } = require('path');
// is directory
const isDirectory = source => lstatSync(source).isDirectory();
// get directories
const getDirectories = source => readdirSync(source).map(name => join(source, name)).filter(isDirectory);
const web3Modules = getDirectories(`${__dirname}/node_modules/web3/packages`); // web3 node_modules
const nodeModules = [`${__dirname}/node_modules`];
nodeModules.push(...web3Modules.map(m => join(m, 'node_modules')));
// in webpack rules use
resolve: {
modulesDirectories: nodeModules,
] |
By the way, for webpack to work, this request #1006 needs to get merged too. |
thanks for your fast reply. I use npm and not yarn. It seems that my problem really has todo with webpack... |
@stefanhuber Try adding extra module directories in webpack resolve as I mentioned above #966 (comment) and see if works? |
@jdkanani thank you for your solution. However I have no idea where I should add this script. Could you a little bit more specific on that? |
@stefanhuber Add that script (or javascript equivalent) into your
Now you assign that array to your webpack rules (in js/jsx loader) in webpack.config file. |
@jdkanani ok I managed to organize this inside the webpack and it seems to work. web3.version is 1.0.0-beta.18, however the object web3.eth.contract is undefined. is there a different api?
|
I just added |
This error still persists. As others have pointed out, NPM seems to be downloading In my case I'm trying to distribute a package that uses |
Same issue while trying to deploy a code that uses web3 to Firebase Functions. @frozeman, any updates? |
Stuck with this. |
Any chance this may be resolved soon? I am also stuck having to use an ugly workaround 😅 . Thanks! |
Still appears to be happening…why is this closed? Tried everything in this thread with no luck. |
The same thing after However reinstalling helps:
|
Resolved the web3-requestManager issue by pinning to 1.0.0-beta.29 version. Previously it was installing 1.0.0-beta.2. |
I came across a same problem after I did
Seems like the version |
I'm getting this in 1.0.0-beta.31, but it works with 1.0.0-beta.30 |
going back to 1.0.0-beta.30 didnt work for me, but removing ^ did |
I had same issue but changing to fixed old version didn't help. Then I realized I am using very new version of Ganache that itself depended on new Web3.js version, thus overriding my package.json Web3js version. |
I had the exact same problem. I needed to retrieve the Web3.js package directly from the develop branch on GitHub to fix the following error that was being thrown when I tried to run the Node.JS app: module.js:549 Error: Cannot find module 'web3-requestManager' This the command I used to do that. It took a fair amount of time to complete so for a while I thought the install had hung. It took almost 10 minutes to fully install:
After that I was able to run my Node.js app. |
For deploying to firebase functions it seems they use yarn and removing the ^ allowed it to deploy successfully for me. Apparently yarn has trouble parsing this version syntax for nested dependencies. |
@nickjuntilla thanks. It worked! |
thanks vsdigitall reinstalling helps: npm r web3npm i web3 |
I started getting this error after I ran |
I have seen this after |
npm install [email protected], just go for it |
how do we get "npm audit fix" not default to deprecated versions of web3? |
@cosminstefanxp I had same problem with web and firebase.. this is worked for me
|
@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! |
Using node 6.11.1 on a macosx
I installed web3 with the following command:
Then i launch this - apparently - simple node command:
Well, it returns the following error:
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?
The text was updated successfully, but these errors were encountered: