-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Failed to resolve entry for package "@zerodevx/svelte-toast" #77
Comments
@rickexa did you accidentally install it as a dev dependency? I did that and got the same error, had to install with |
I indeed installed it as a dev dependency since in the readme is specified:
Anyway I've just tried the normal Thank you very much. |
Same for me. Uninstalling does not fix issue. I removed all modules and started from scratch. Issue persists. |
Perhaps something changed in Svelte-world. @susnick, what's your setup? Are you using SvelteKit? |
I am not using SvelteKit. I use the vite template, svelte-ts for my project. |
I just tried on a new https://stackblitz.com/edit/vitejs-vite-zqx6gs?file=src%2FApp.svelte&terminal=dev |
Yes, I confirmed it works on fresh project. I tried installing on another project I had, and it gave same error, so there must be something else causing the issue. I just switched to using a different lib for toasts, and I have no issues. If you want me to assist troubleshooting for this project, I will help, just point me in direction to go. |
I'm not sure how I can help. You're not providing details, and a fresh install on your mentioned setup works, so it's likely something unrelated to this repo. If you're getting an error like:
it likely indicates that you're not using a "svelte-aware" bundler setup. |
If you could provide a minimal repro on stackblitz or something, then it'll be much easier to debug. |
So i put my project on stackblitz, and it worked fine. Ill have to spend some time to figure out why it wont work. Thanks for the assist. |
Fwiw, I am facing the same problem, and am also using vite |
What does this mean? What does this package specifiy that would need special handling? |
@powellnorma could you do a minimal repro of the issue in stackblitz?
Most people are using vite, but there are many flavours, like sveltekit, create-vite, or some other svelte-based starter template.
Svelte-based template must use tooling that is svelte-aware, meaning when the bundler reads the exports from "exports": {
".": {
"types": "./index.d.ts",
"svelte": "./index.js"
},
//...
} it understands that it's dealing with a svelte component. Edit: however it seems like multiple users are facing the same issue - perhaps something changed (again) in the Svelte ecosystem in the last week or so, like a breaking PR (happens more often than you think). |
With the following I am able to reproduce it: https://github.com/powellnorma/toast-problem Using
Thank you for investigating! |
Fyi, after specifying |
The same issue with vite |
Make sure your dependencies are updated, remove
|
This Worked! Thanks |
I also ran into this issue. However I was able to fix this by simply restarting the vite server so if this was installed while the server was already running, try restarting it. As for installation command, I ran |
I ran into this as well - my solution was to: pnpm i -D vite@latest @sveltejs/vite-plugin-svelte@latest |
Hey @zerodevx , "exports": { |
I was able to resolve this issue by adding |
I am also running into this issue and updating deps did not resolve it - I am using the latest version of SvelteKit with the Yarn package manager if that helps. |
make sure you've updated |
I've just installed and imported this component in svelte but I get this error:
simply adding
import { SvelteToast } from '@zerodevx/svelte-toast'
to+layout.svelte
page.I tried to figure out what that could mean but I'm pretty new to svelte/sveltekit... so I'm writing here to seek for help.
Thanks.
The text was updated successfully, but these errors were encountered: