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

TS1192: Module '"project/node_modules/numbro/numbro"' has no default export. #352

Open
isneezy opened this issue May 7, 2018 · 4 comments

Comments

@isneezy
Copy link

isneezy commented May 7, 2018

Hello, I'm trying to use this wonderful library with typescript but when imported it does not compile and gives me this error
TS1192: Module '"path/project/node_modules/numbro/numbro"' has no default export.

After changing the last line of the file numbro.d.ts from export = numbro into export default it compiles successfully.

After a litle bit of investigation i found that if we/you want to use es6 syntax you should explicit export default or use require('module') if you have export = module witch is our case and this breaks es6 style syntax
See microsoft/TypeScript#2242 (comment)

@aralisza
Copy link
Contributor

aralisza commented Jul 9, 2018

I'm experiencing the same issue and went ahead and created a PR for this change.

@dotob
Copy link

dotob commented Jan 15, 2020

hey is this stalled? it would be really nice if there where a fix

@BenjaminVanRyseghem
Copy link
Owner

I would love to see this moving forward, but I have 0 knowledge when it comes to typescript 😕

@isneezy
Copy link
Author

isneezy commented Jan 16, 2020

@BenjaminVanRyseghem isn't this fixed with #363? I didn't tested it coz at the time I had to find some alternatives since I was running on a tight schedule.

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