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

1.0 beta.27 not working for typescript "resolves to a non-module entity" #1259

Closed
helxsz opened this issue Dec 28, 2017 · 6 comments
Closed
Assignees

Comments

@helxsz
Copy link

helxsz commented Dec 28, 2017

I am currently upgrading to latest 1.0 beta.27,

import { default as Web3 } from 'web3'; doesn't work . gives a error below

/node_modules/web3/index"' resolves to a non-module entity and cannot be imported using this construct.

@shunia
Copy link

shunia commented Jan 16, 2018

Possible to pass the compile process:

var Web3 = require('web3');

This way Web3 lost type definitions though, even there is a index.d.ts inside node_modules/web3.

@nivida nivida self-assigned this Aug 9, 2018
@nivida nivida added Enhancement Includes improvements or optimizations and removed Enhancement Includes improvements or optimizations labels Aug 9, 2018
@nivida
Copy link
Contributor

nivida commented Nov 29, 2018

@helxsz this should be fixed after the PR #2000

@jeansouza
Copy link

jeansouza commented Feb 15, 2019

@nivida the problem wasn't fixed, I'm still not able to use import Web3 from 'web3'.

@nivida
Copy link
Contributor

nivida commented Feb 18, 2019

@jeansouza Yes, there is a similar TS issue. I will fix and release it asap. I apologize for the troubles.

@jeansouza
Copy link

@nivida thank you very much! =]

@nivida
Copy link
Contributor

nivida commented Apr 2, 2019

The readme file got updated and explains the usage of the Web3.js lib in a commonjs environment.

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