I have created my example using embark meteor_demo and then changed my configuration on embark.yml to output the contract on the server folder instead of the client.

From that point i started getting some errors, which i described on github here.

Basically web3 wasn't defined on the server and after i add the web3 package from atmosphere it's still undefined.

Any recommendation on next steps? Should i use the web3 project from npm and include it manually on the server?

1 Answer 1


So i found the solution and it was rather obvious and simple.

I needed to meteor add ethereum:web3 and then on the server side it's needed to create a Web3 object web3 = new Web3().

The issue with the meteor example is to load the generated embark.js file just after the web3 object was created, otherwise you will get an error.

Ideally embark would create it automatically in case you export on the server folder, we could leverage from the yml configuration file to customise the parameters used when creating the web3 object.

The deployed contracts will surely work from anywhere, we just need now to make embark framework aware of this use case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.