basejump
basejump copied to clipboard
Package issue with vite/react causes build error
Hi all, when installing @usebasejump/react in a project with vite, it looks like there's some issues with the npm package that causes the import to fail.
Error: (when importing anything with the package)
[ERROR] Failed to resolve entry for package "@usebasejump/react". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
Minimum Reproduction:
- npm create vite
- select react, typescript + swc
- npm install @usebasejump/react
- npm install
- add an import to App.tsx - import { usePersonalAccount } from "@usebasejump/react";
- then just use it so the the bundler grabs it, you don't need to get a Supabase client or anything set up first as an argument, it doesn't matter for this error - const personalAccount = usePersonalAccount();
- npm run dev, experience error.
I tried figuring this issue out with the package, but wasn't quite able to. I ended up just taking the hooks and types and placing directly in my repo and it all works great for now in the meantime. Thanks for making this project, it's a huge timesaver.