PlayForm / Compress

πŸ—œοΈβ€Compress —
https://playform.github.io/Compress/
Other
510 stars 12 forks source link

Error when evaluating SSR module #206

Closed igorskyflyer closed 1 year ago

igorskyflyer commented 1 year ago

Hello, thanks for the plugin, been using it for some time but after upgrading from v2.0.15 to the latest version v2.1.1 I get the following error when I run either astro dev or astro build.

[vite] Error when evaluating SSR module D:\Dev\igorskyflyer.me\astro.config.mjs: failed to import "astro-compress"

|- Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'typescript-esbuild' imported from D:\Dev\igorskyflyer.me\node_modules\astro-compress\Target\Variable\Option.js

I am using the latest Astro (v3.3.2) and I DON'T use it in SSR mode.


Here's what I've tried:

I've tried deleting the node_modules folder and reinstalling all of the packages but the issue remains.

Also, I've tried adding it to the vite SSR config:

vite: {
    ssr: {
      noExternal: ['astro-compress']
    }
}  

When I remove astro-compress from my integrations I get no errors and everything works as expected.


Hope we can fix this, thanks! πŸ˜€

NikolaRHristov commented 1 year ago

Sorry, does v2.1.2 fix it for you?

NikolaRHristov commented 1 year ago

Or v2.1.3

igorskyflyer commented 1 year ago

Thanks for the reply, I will try it in an hour or so and get back to you with feedback. 😁

NikolaRHristov commented 1 year ago

Roll back to v2.0.15 for now.

igorskyflyer commented 1 year ago

Roll back to v2.0.15 for now.

I've just installed v2.1.3 and guess what? It works! Both the build and dev command.

Thanks, @NikolaRHristov. πŸ˜€

NikolaRHristov commented 1 year ago

Crazy, I've deprecated them for now. Will test and release new ones later. 😁