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

Module '"@brainandbones/skeleton"' has no exported member 'dialogStore' #276

Closed
CodyOakes opened this issue Sep 23, 2022 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@CodyOakes
Copy link

Getting this TS error when attempting to import "dialogStore" into a component to trigger a DialogConfirm:
Module '"@brainandbones/skeleton"' has no exported member 'dialogStore'

version: "@brainandbones/skeleton": "^0.41.48"

Noticed on line 42 of index.js in the skeleton source there is an import amongst all the exports:
import { dialogStore } from './utilities/Dialog/stores';

Enjoyed the package so far especially the most recent release, seems like it's moving in a great direction. Keep up the good work! Thanks!

@endigo9740
Copy link
Contributor

endigo9740 commented Sep 23, 2022

Hey @CodyOakes, definitely seems we have a bug here. We utilize an index.ts file to a "shorthand" import method from the node_modules package directory. Here's a snippet of that:

Screen Shot 2022-09-23 at 10 54 11 AM

The dialogStore reference is there, but for some strange reason it's greyed out, while toastStore isn't. VS Code tells me this is because it's never used. But, well, of course it's not used. It's an export definition heh. The problem seems to be this is excluded when we actually build the package! Which isn't what we want.

I'm going to have to do a little research and figure out what's up here. In the meantime, you should able to work around this by importing from the full path. This would be:

import { dialogStore } from "@brainandbones/skeleton/utilities/Dialog/stores";

Sorry about that. If we can figure it out I may put out a quick hotpatch to help you and others. Let me know if the above solution works for you and thanks for the kind words!

@endigo9740 endigo9740 added the bug Something isn't working label Sep 23, 2022
@endigo9740
Copy link
Contributor

@CodyOakes Ok, it just occurred to me what's up. We used import rather than export. Dumb mistake on my end :) I'll get a patch out later today!

@CodyOakes
Copy link
Author

@endigo9740 Haha that's what I meant by "an import amongst all the exports". Thanks for the work around, and quick response! I'll watch for the patch.

@endigo9740
Copy link
Contributor

Well shoot, you did! Seems I need a bit more coffee this morning :)

@endigo9740
Copy link
Contributor

@CodyOakes The patch has been push. New version is 0.41.49. Given how simple the change is I feel confident this will resolve your issue, so I'm going to close this ticket. But thanks for bringing this to our attention!

Let us know if you run into any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants