-
-
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
Error when using version 0.4.0 #25
Comments
Can I check which bundler (rollup/webpack/something else) you're using? |
@zerodevx I'm using webpack 5 with svelte-loader. |
Where (and how) did this error appear? In the browser JS console or in terminal dev server? Does this appear when a toast is pushed?
I find it a little strange that it throws at |
This appears in browser when loading app for first time. There is also the webpack dev version of error shown on reload:
|
In your source, can you try importing the package like this: <script>
import { SvelteToast } from '@zerodevx/svelte-toast/src'
...
</script>
<SvelteToast options={toastOptions} /> and let me know what happens? |
I receive this: However, I modified svelte-toast |
AFAIK "svelte": "src/index.js",
"module": "dist/index.mjs",
"main": "dist/index.js", For non-Svelte apps, webpack will use the Could you help test one more time: this time, can you pin |
I installed 0.3.0 using |
Thanks so much for the info. Let me check again and get back to you. |
After meddling with bundled file, I found out this line is what causes the issue. This property did not exist in version 0.3.0 bundle. It seems that |
Svelte recently commited these changes: sveltejs/svelte@5cfefeb#diff-da9bae4e28c441de5ba3a074e30775fe69109100b3d921ad8f2592d93cd67b7f This patch contains a new EDITED: I have also created an issue at sveltejs here: sveltejs/svelte#6584 |
@zerodevx In my ticket on sveltejs, one reported that updating the following dependencies to versions below (at least) solved issue caused on build.
Problem first occurred when plugin dependencies were updated right before 0.4.0 release, so I assume it's svelte environment that causes this. Source files worked fine for me because I used an older svelte version in addition to |
Thanks so much for investigating. Can I just check that in your resolve: {
alias: {
svelte: path.resolve('node_modules', 'svelte')
},
extensions: ['.mjs', '.js', '.svelte'],
mainFields: ['svelte', 'browser', 'module', 'main']
}, I just want to make sure that your Svelte app is using the component source. |
This is what I'm using according to sveltejs/template-webpack:
I also tried alias with |
Hello, I got the same error with svelteKit but resolved after updating to 3.41.0 |
So, I think there are two issues here:
@dimitrisrk - I'll release a patch version in a bit that should solve your issue; on your end, just update your npm dependencies (specifically @LucianVoju - can I check what bundler setup you're using? |
@zerodevx Everything works smoothly. Thank you very much! |
Hello, Updated to 0.4.1 but sill got the typescript error. My setup is: /** @type {import('@sveltejs/kit').Config} */ element in src/app.html
target: '#svelte', vite: { optimizeDeps: { include: ['svelte-hero-icons'], }, resolve: { alias: { $pages: path.resolve('./src/pages'), $components: path.resolve('./src/components'), $stores: path.resolve('./src/stores') } },
}; |
Moving the previous comment to the correct issue.
For posterity, the reason for reverting #12 is because adding the Closing this issue for now - but feel free to re-open if you encounter further problems. |
Version 0.3.0 worked just fine but when I installed new version I received the following error.
The text was updated successfully, but these errors were encountered: