-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Meteor server side: contract event.watch error #1333
Comments
Hello all, have been working on this issue also for a while. Web3 is working in the Meteor client, but I have seen several open questions on SO relating to server side issues with Web3 in Meteor. I've collated them in a new SO . As far as I can tell, it seems like an unintentional package dependency recursion loop (have addressed same effect with another npm package in Meteor before). Will attempt to determine which is the package conflict. Of important note, the effect (empty Web3 object |
Update: @fedecryto @nivida @frozeman Having isolated the fact that there is a dependency recursive loop that is preventing web3 from being imported, I have tested removing most of the Meteor npm package dependencies from the core of the framework using These are the dependencies in meteor-node-stubs. |
Updated my SO with an answer which describes the 'workaround' to get Web3 working on the Meteor server. NOTE: This relates to Web3 1.0 |
Closed because of the ongoing clean up of the issue list. Feel free to ask this in our gitter channel or on stackoverflow. |
I can't watch for an event on the server side of my Meteor app. (client is working fine)
I tried two alternatives:
A) using ethereum/web3 meteor package
Server side code:
methods.js
error
B) using web3@0.20.1 npm package
(Removed ethereum/web3 package)
Server side code:
methods.js
error
And finally, this is not an issue now, but it's kind of annoying that web3 (global) is defined on client side, but undefined on server side. That's "solved" using
web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/"));
but what if I wanna keep using the same instance as in the client side and get, for example, web3.eth.accounts on the server side?Thanks!
The text was updated successfully, but these errors were encountered: