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

Web3 & Angular2< #1155

Closed
rastislavcore opened this issue Nov 2, 2017 · 4 comments
Closed

Web3 & Angular2< #1155

rastislavcore opened this issue Nov 2, 2017 · 4 comments

Comments

@rastislavcore
Copy link

rastislavcore commented Nov 2, 2017

Is here any tutorial how too implement web3.js with Angular2<?

After npm install and integration:
import Web3 from 'web3';
I get:
Module '".../node_modules/web3/index"' has no default export.

It is really hard to implement.

@rastislavcore
Copy link
Author

BTW I solve problem with bignumber.js error with installing "bignumber.js": "4.1.0"

@hodlbank
Copy link

Until it is fixed, you can use "allowSyntheticDefaultImports" in "compilerOptions" in tsconfig.json .
Then you can import Web3 as
import * as Web3 from 'web3';

@BennettLarson
Copy link

Any further news with this problem?

@rastislavcore
Copy link
Author

I will test it. BTW I upgrade to Angular 2+

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

3 participants