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

Missing Modules & TS Issues #34

Closed
matt-joecoffee opened this issue Sep 17, 2021 · 3 comments
Closed

Missing Modules & TS Issues #34

matt-joecoffee opened this issue Sep 17, 2021 · 3 comments

Comments

@matt-joecoffee
Copy link

Cool idea, but the implementation seems pretty lacking at the moment. I installed it, added it to my app, and received these errors:

honeybadger.js?e9d7:1057 ./node_modules/kbar/lib/KBarContent.js:26:0
Module not found: Can't resolve '@reach/portal'

Import trace for requested module:
./node_modules/kbar/lib/index.js
./components/GlobalProviders/index.tsx
./pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found
eval @ honeybadger.js?e9d7:1057
r @ fs.js:3
handleErrors @ hot-dev-client.js?5345:120
processMessage @ hot-dev-client.js?5345:170
eval @ hot-dev-client.js?5345:32
eval @ eventsource.js?a343:38
handleMessage @ eventsource.js?a343:36
honeybadger.js?e9d7:1057 ./node_modules/kbar/lib/KBarResults.js:25:0
Module not found: Can't resolve 'match-sorter'

Import trace for requested module:
./node_modules/kbar/lib/index.js
./components/GlobalProviders/index.tsx
./pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found
eval @ honeybadger.js?e9d7:1057
r @ fs.js:3
handleErrors @ hot-dev-client.js?5345:120
processMessage @ hot-dev-client.js?5345:170
eval @ hot-dev-client.js?5345:32
eval @ eventsource.js?a343:38
handleMessage @ eventsource.js?a343:36
honeybadger.js?e9d7:1057 ./node_modules/kbar/lib/useStore.js:22:0
Module not found: Can't resolve 'fast-equals'

Import trace for requested module:
./node_modules/kbar/lib/KBarContextProvider.js
./node_modules/kbar/lib/index.js
./components/GlobalProviders/index.tsx
./pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found

We already have a portal, so I'm not keen to install reach portal, or any of the other reach components. But also, shouldn't this thing just handle its own dependencies?

Also, seems not to be TypeScript ready. I get this error from TS:

Property 'options' is missing in type '{ children: ReactNode; actions: { id: string; name: string; shortcut: string[]; keywords: string; perform: () => Promise<boolean>; }[]; }' but required in type 'KBarProviderProps'.ts(2741)

... though I've seen no indication that "options" should be a required property.

I hope this might be worth a second look later on, when it's more fully baked.

@timc1
Copy link
Owner

timc1 commented Sep 17, 2021

Hey @matt-joecoffee, thanks for taking the time to check out the lib :-)

Try out the latest version npm i kbar@latest – the dependencies & type errors should be fixed there. Lmk if that helps.

@matt-joecoffee
Copy link
Author

Much better! Thank you.

Might be convenient to offer this in the documentation:

import { KBarContent, KBarProvider, KBarResults, KBarSearch } from 'kbar'

Also looks like I'll need to roll my own styling. I can certainly sort that out, but it might be nice to offer some direction in the docs as well.

Thanks for the quick reply, and fixes.

@timc1
Copy link
Owner

timc1 commented Sep 17, 2021

Oh yes, lots of information coming soon – it's been a wild few days so trying to catch up and plan what's ahead!

You can pretty much customize all styling right now, but it's not as nice of a dev experience as I wish – so currently working on a plan to improve that, more to come

@timc1 timc1 closed this as completed Sep 17, 2021
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