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

TypeError: lnrpc_1.default is not a function #18

Closed
mitchelljustin opened this issue Mar 4, 2019 · 3 comments
Closed

TypeError: lnrpc_1.default is not a function #18

mitchelljustin opened this issue Mar 4, 2019 · 3 comments

Comments

@mitchelljustin
Copy link

import createLnRpc from "@radar/lnrpc" doesn't seem to work. createLnRpc isn't a function.

Platform: darwin_x64
Node: v11.10.1
@radar/lnrpc version: 0.5.2-beta

@cavanmflynn
Copy link
Contributor

Thanks for opening an issue!

It seems that our typings are using export default, rather than export, which prevents Typescript from displaying the correct error message and breaks as * imports. I'll push a fix ASAP to address this issue. Regardless, you must set "esModuleInterop": true in your tsconfig.json if you would like to use a default export.

@mitchelljustin
Copy link
Author

Ah excellent, that works. Thanks!

@cavanmflynn
Copy link
Contributor

The typings have been fixed in release 0.5.2-beta.0.

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

2 participants