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

getFlags function has TS issue #44

Open
unoscar opened this issue Jan 14, 2023 · 3 comments
Open

getFlags function has TS issue #44

unoscar opened this issue Jan 14, 2023 · 3 comments

Comments

@unoscar
Copy link

unoscar commented Jan 14, 2023

Hi there, I am using the flags implementation into a next.js project with TS, when creating the getFlags function I get the following error:

Exported variable 'getFlags' has or is using name 'FactoryGetFlagsOptions' from external module "/home/unoscar/workspace/src/github.com/bd-dashboard/main-platform/node_modules/@happykit/flags/dist/server" but cannot be named.ts(4023)

I believe this can get fixed by just exporting the FactoryGetFlagsOptions interface.

I'll be creating a fork with the fix and a PR, but in case it help to have the issue recorded here.
Cheers

@dferber90
Copy link
Contributor

dferber90 commented Jan 16, 2023

Interesting, as I've not seen that before.

How are you importing getFlags in your code? Could you copy the import line here?

Are you maybe importing from @happykit/flags/dist/server instead of @happykit/flags/server?

@karmatradeDev
Copy link

hi im having this problem as well i think an export on line 18 does the trick.

Screenshot 2023-04-17 at 11 52 01 AM

@dferber90
Copy link
Contributor

@karmatradeDev Could you show the source code of the file where you are seeing this error?

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