bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte
https://sveltestrap.js.org
MIT License
1.3k stars 183 forks source link

Error: <component> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules #469

Open metayii opened 2 years ago

metayii commented 2 years ago

I created a new demo project with the standard proccess, then I added the @sveltejs/adapter-static@next plugin. If I npm run dev I get:

Error: is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

Otherwiser, npm run build works fine.

metayii commented 2 years ago

"@sveltejs/adapter-static": "^1.0.0-next.24", "@sveltejs/kit": "^1.0.0-next.231", "svelte": "^3.46.0", "sveltestrap": "^5.9.0"

pierre-H commented 2 years ago

Same problem 😞

GaryAustin1 commented 2 years ago

I had a running project I just updated all the dependencies and now I get the above error on <Container> in dev. If I build it works fine. "@sveltejs/adapter-static": "^1.0.0-next.29" "@sveltejs/kit": "^1.0.0-next.304" "svelte": "^3.46.0" "sveltestrap": "^5.9.0" "vite": "^2.9.1"

I've backed up versions a month or so for several libraries and no joy.

alucryd commented 2 years ago

I'm in the same boat. It was working just fine a few weeks ago. Just bumped everything and now getting the same error. Like @GaryAustin1 rolling back doesn't even fix the issue. Any idea?

GaryAustin1 commented 2 years ago

I was able to get moving at the moment doing this: https://github.com/floating-ui/floating-ui/issues/1588 modifying jspopper as described. Not a real fix,though.

alucryd commented 2 years ago

I was able to get moving at the moment doing this: floating-ui/floating-ui#1588 modifying jspopper as described. Not a real fix,though.

Thanks for the tip! So the issue is not with sveltestrap, at least we can work around it.

GaryAustin1 commented 2 years ago

Not sure sveltestrap can't solve it. See here: https://github.com/bestguy/sveltestrap/issues/463

azmi2409 commented 2 years ago

add "type"="module" in popperjs package.json seems fix it

bestguy commented 11 months ago

Hi, can you please test with the latest release and confirm it resolves? v5.11.2