-
Notifications
You must be signed in to change notification settings - Fork 55
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: No loader is configured for ".node" files: node_modules/@resvg/resvg-js-linux-x64-musl/resvgjs.linux-x64-musl.node
with Vite 4 and Netlify
#175
Comments
I discovered and tried evanw/esbuild#1051 but unfortunately it didnt change anything |
try |
Thanks to @Brooooooklyn for the answer. |
thank you - closing for now until i can try this again |
@sw-yx I have resvg-js working on Netlify with SVG from Satori using the following in my
|
For anyone having this issue with the library while using the
|
Thanks @bartosjiri this worked perfectly. I'm using Astro, so the place to declare external dependencies is on the export default defineConfig({
vite: {
ssr: { // ssr instead of rollupOptions
external: ['@resvg/resvg-js']
}
}
}) |
Thanks for sharing it but your snippet didn't solve the issue with Astro for me. It's still impossible using resvg-js on Netlify and i'm get an error in the building step. |
@antoniods, sad to hear that. Ultimately, I had to deploy to Vercel instead, not because of this, but because I was having issues at the build stage with the I did change the config to add This is my current configuration, and it worked on Netlify, but the build step failed because of the export default defineConfig({
ssr: { external: ["@resvg/resvg-js"] },
optimizeDeps: { exclude: ["@resvg/resvg-js"] },
build: { rollupOptions: { external: ["@resvg/resvg-js"] } },
},
}) |
Build stage works perfectly on vercel, no more issues with and resvg-js in my case. Thanks @taverasmisael |
This was helpful to landing at the following: astro.config.mjs
With:
Just leaving in case someone finds it useful! |
Hey @antoniods, Did you manage to get this working with Netlify. It's pretty unbelievable this still isn't working |
Hi, apologies if this is the wrong repo for this error but I am following https://geoffrich.net/posts/svelte-social-image/ and it works locally, but fails when I try to deploy to Netlify:
Full error message
I'm not sure where this message comes from but you can see the error in this branch https://github.com/sw-yx/swyxkit/tree/addOgimage when deployed to Netlify: https://app.netlify.com/sites/swyxkit/deploys/63954a072248cf0008f384ae
blocking swyxio/swyxkit#145 right now with this error message
The text was updated successfully, but these errors were encountered: