-
Notifications
You must be signed in to change notification settings - Fork 8
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
SvelteKit build fails on dayjs ES module import not supported #9
Comments
@kbsali Thank you for raising this issue. What SvelteKit version are you using? What adapter? The SvelteKit example uses the latest SvelteKit version with the Node adapter and is able to build successfully. |
So it's with the Vercel adapter. In the end I only started using your component and so it was not too long to implement my own component based on |
@kbsali Thank you for the details. I swapped the Node adapter for the Vercel adapter and it still built successfully. However, I was able to repro the error by installing Related: #3 (comment) |
There's still an issue with Vite (essentially a restart of the dev-server required for every change), which dayjs v2 should fix, but they're in alpha and haven't ported |
It looks like An alternative would be to fork |
If everything else except of |
And today, I'm also facing the same issue using VITE |
I'm also facing the same issue trying with a 'yup' module, using the node adapter. |
Same issue here, Netlify build failure with error |
Update: I published v0.7.1 which switches the This should unblock usage of this library with SvelteKit. The current downside is that it doesn't work with Snowpack, which I've recorded as a known issue. However, I feel that it's better to unblock SvelteKit than Snowpack since SvelteKit/vite has ~30x the usage of Snowpack (based on average NPM downloads). |
Thank you very much @metonym for your time and effort. |
thanks @metonym ! |
I just tried out this plugin using the instructions here on this repo:
and get an Might this be related to the use of typescript or did I run into the issue here? |
@Giszmo What set-up are you using? |
node v18.6.0 ... what part of set-up do you mean? It was for https://github.com/Giszmo/nostroid |
By set-up, I'm referring to SvelteKit/Vite/Rollup etc. It looks like you're using SvelteKit. From a glance, it looks correct. Are you able to run the SvelteKit example locally? |
Everything works totally fine until I try to add svelte-time. The import runs into issues. If you want me to debug something, I'm around but else, I wrote my own widget that's good enough for now. |
Hi,
Thanks for this cool lib/component. It works great in dev mode for a Sveltekit project I am developping, but when running
npm run build
it fails with the following error :Any idea how this could be fixed? 🙏
The text was updated successfully, but these errors were encountered: