Open norricorp opened 1 year ago
Just to add, I commented out the time tag. Still same error. So then I commented out the import lines and now it works. (obvioulsy without the svelte-time code)
What set-up are you using? If SvelteKit, what version?
Hi @metonym, thanks for getting back so quickly. I am not using sveltekit. I am using svelte 3.49.0. Running on windows 10. Is there anything you want?
So the problem is "Usage with Vite". I needed to add
optimizeDeps: {
include: ["dayjs/plugin/relativeTime.js"],
},
to vite.config.js
Perhaps edit docs to say if get ambiguous indirect error then make sure vite.config.js is updated.
Glad you got it working. Marking this as a dupe of #27, #24.
FWIW, I believe that @sveltejs/vite-plugin-svelte version >=1.3.0 will automatically optimize these dependencies, meaning it's no longer required.
Hello, I wonder if you can help with this.
Here are snippets of my code
without the svelteTime code, all is well, first.publish_date is printed. With the extra code, I get an error in firefox console of above. It is a line two of days.js.
So I changed first.publish_date with "2021-02-14" and got the same error. Obviously this works in the repl.
Any ideas what I am doing wrong?