Skip to content
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 1.3 Integration #87

Closed
retotrinkler opened this issue Apr 22, 2016 · 11 comments
Closed

Meteor 1.3 Integration #87

retotrinkler opened this issue Apr 22, 2016 · 11 comments

Comments

@retotrinkler
Copy link

retotrinkler commented Apr 22, 2016

hi i'm trying to use https://github.com/ConsenSys/eth-lightwallet w Meteor 1.3. Meteor install commands:

meteor create ethereum-app
cd ethereum-app
meteor npm install
meteor npm install --save eth-lightwallet

but when using eth-lightwallet from w/in meteor. Just copy the following line into main.js (for example):

import lightwallet from 'eth-lightwallet';

and starting the meteor app with:

meteor

i get:

Unable to resolve some modules:

  "build/Release/sha3" in
/home/reto/Development/ethereum-app/node_modules/eth-lightwallet/node_modules/ethereumjs-util/node_modules/keccakjs/node_modules/sha3/package.json
(web.browser)

does somebody have a idea on how to solve this?

@retotrinkler retotrinkler changed the title Meteor Integration Meteor 1.3 Integration Apr 22, 2016
@pjworrall
Copy link

I spent some time on this and hit the same problem. I also tried putting the .js libraries, async.min.js, hooked-web3-provider.min.js, lightwallet.min.js and web3.min.js into a lib so they loaded conventionally but that caused meteor to hang. I tried it with 1.2 and the meteor hung there in the same way (obviously 1.2 does not support imports). I am going to refer the hanging to the Meteor team.

I am now just exploring it in a conventional js webapp without Meteor.

@retotrinkler
Copy link
Author

tried the conventional import as well, but same result - meteor hangs..
ok thanks. i'll have to stick w meteor.. i'm in too deep atm to reverse

@coder5876
Copy link
Contributor

Hi @retrotrinkler and @pjworrall, I have not worked with meteor but I know others had problems using lightwallet in meteor as well. Let me know if you are able to get it working and I'll be happy to merge a PR.

@retotrinkler
Copy link
Author

Hey @christianlundkvist. Thanks for your response. If I find the solution, I will let you know

@pjworrall
Copy link

thanks @christianlundkvist . I have put Meteor to one side and am just working with a simple Javascript environment until I understand how things should work. Like @retrotrinkler I'll need to go back to Meteor afterwards and will share if I find a solution for it.

@IstoraMandiri
Copy link
Contributor

IstoraMandiri commented Apr 24, 2016

Seems like this issue isn't specific to eth-lightwallet; it's originating from the ethereumjs-util -> keccakjs dependency.

If you really want to get it working with Meteor, a temporary fix that worked for me was to clone and rewire the dependancy tree, then hardcode:

kekkackjs/index.js

module.exports = require('browserify-sha3').SHA3Hash

@retotrinkler
Copy link
Author

that works! very impressive. thanks very much chris

@pjworrall
Copy link

pjworrall commented Apr 28, 2016

@hitchcott hi. How did you isolate the problem Meteor had when it hung. Is there a logging mode for Meteor's startup? Was it the Meteor console or some node trickery you used?

@IstoraMandiri
Copy link
Contributor

@pjworrall No special tricks; I just saw that keccak was the dependancy that was causing the problem (see initial post):

/home/reto/Development/ethereum-app/node_modules/eth-lightwallet/node_modules/ethereumjs-util/node_modules/keccakjs/node_modules/sha3/package.json

Then I just tried poking around with that package locally until it worked.

@IstoraMandiri
Copy link
Contributor

Btw, if you want to use it right now you can update your package.json:

    "eth-lightwallet": "git@github.com:hitchcott/eth-lightwallet.git#eee0141d9a140e269601f116ee565ede60fb248a"

@pjworrall
Copy link

ah! . My Meteor had just hung and never reported anything. I had to kill the processes. I hadn't read @retrotinkler log properly. I am all go now. So thanks.

coder5876 added a commit that referenced this issue Apr 29, 2016
Meteor support: update `ethereumjs-util` to `4.3.1`; fixes #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants