-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Uncaught TypeError: Cannot read property 'node' of undefined. #1986
Comments
@MuhtasimTanmoy Could you please add a code snippet? |
I am working with web3.js in meteor.Need to call some methods in a smart contract.
Also this undefined node points to
in module.js Was working fine lately.Not working after update. ` |
@MuhtasimTanmoy which version are you using? I got the same error on ^1.0.0-beta.36. |
So I tested some versions:
So I rolled back to 1.0.0-beta.34 for now... btw, this is my (typescript) code:
|
@MuhtasimTanmoy I got the same error on ^1.0.0-beta.36. Do you find a solution now? |
2 similar comments
@MuhtasimTanmoy I got the same error on ^1.0.0-beta.36. Do you find a solution now? |
@MuhtasimTanmoy I got the same error on ^1.0.0-beta.36. Do you find a solution now? |
I believe the problem is that web3 is not being bundled properly and the client is trying to use xhr2-cookies package instead of the browser's built-in XMLHttpRequest. xhr2-cookies package is for Node.js only, so it throws when process.versions.node is called, which doesn't exist in browsers. 0.20.7 uses xhr2-cookies, while 0.20.6 uses xhr2 package instead which gets bundled properly for the browser. |
This error occurs not only infura. I had the exact same error with beta.36 and Ganache. Rolling back to beta.34 solves this for now. |
This should be fixed with the PR #2000 |
receiving was using Edit: rolling back to |
I fixed it by specify a value to process.versions.node |
This got fixed with the new HttpProvider. Feel free to open a new issue if there is still a problem. |
I get the same problem with web3 v1.3.4, this fix resolved my issue. |
Using
web3 1.0.0
withinfura
. Everything was working fine but after version update it doesn't anymore.The text was updated successfully, but these errors were encountered: