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

Upgrade to Svelte 5 #11

Open
jimmy121192 opened this issue Nov 18, 2024 · 7 comments
Open

Upgrade to Svelte 5 #11

jimmy121192 opened this issue Nov 18, 2024 · 7 comments

Comments

@jimmy121192
Copy link

Svelte 5 has been released, but Svoast is currently using Svelte 4, which is not compatible with the latest version.
Screenshot 2024-11-18 092626

@Gibbu
Copy link
Owner

Gibbu commented Nov 19, 2024

Hey sorry about that mate, I've finally converted it to Svelte 5!

Install using: [email protected].
Everything should still work the exact same, but let me know if you find anything!

@jimmy121192
Copy link
Author

jimmy121192 commented Nov 19, 2024

Thanks @Gibbu for the quick response. After I installed the new version ( 3.0.1) , I got an issue:
[plugin:vite:import-analysis] Failed to resolve entry for package "svoast". The package may have incorrect main/module/exports specified in its package.json.

Terminal log:

Screenshot 2024-11-19 at 10 27 00 AM

Screenshot 2024-11-19 at 10 23 52 AM

I checked the svoast packages.json file and I saw this:
Screenshot 2024-11-19 at 10 32 23 AM

Screenshot 2024-11-19 at 10 35 31 AM

I changed the paths to ./package/ so it could work for now.
Can you please update the fix? Thanks :)

@Gibbu
Copy link
Owner

Gibbu commented Nov 20, 2024

Whoops, yeah I forgot to change that while copy/pasting it over.

[email protected] should fix this.

@jimmy121192
Copy link
Author

jimmy121192 commented Nov 20, 2024

Hi @Gibbu . Thanks for the fix.
However, there is still an error on the page where I use import { toast } from 'svoast'; :
Screen Shot 2024-11-20 at 10 19 38 AM

I checked the /node_modules/.vite/deps/svoast.js :
Screen Shot 2024-11-20 at 10 24 59 AM

So, I need to change to import { toaster } from 'svoast'; to fix the problem.
Could you release a new version with this fix ? (either by updating the documentation or changing the export name. I prefer the second one to avoid an extra migration guide ). Thanks.

@Gibbu
Copy link
Owner

Gibbu commented Nov 21, 2024

Yeah wowee again, another thing I forgot to change...

Third time is a charm: [email protected]

@jimmy121192
Copy link
Author

Thanks @Gibbu . It's all good now 🍾

@NormandoHall
Copy link

NormandoHall commented Dec 21, 2024

svoast 3.0.3

ReferenceError: toaster is not defined
    at Toasts (/opt/minerva/devel/node_modules/svoast/package/Toasts.svelte:23:9)

Using svelte: 5.15.0 and kit: 2.13.0

The project is configured to use js

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