#✔ Optimising with @astrojs/image and Sharp ends in build failure
1 messages · Page 1 of 1 (latest)
Running Node V19. And here's my Astro config file:
`import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import image from "@astrojs/image";
export default defineConfig({
integrations: [
tailwind({
config: {
applyBaseStyles: false,
},
}),
image({
serviceEntryPoint: "@astrojs/image/sharp",
}),
],
defineConfig: {
output: "static",
},
});`
You could try downgrading Node to v18
Btw, I also updated my tconfig.json like this:
{ "extends": "astro/tsconfigs/base", "compilerOptions": { "baseUrl": ".", "paths": { "@components/*": ["src/components/*"], "@assets/*": ["src/assets/*"] } } }
@jovial warren Okay, I had that in mind. I haven't done that before. Do you have a link to how-to?
I have never done it before so I am not too sure, a answer on stack overflow says you could do this for windows ```shell
npm uninstall -g node
npm install -g node@[version]
I'll find it. Thanks. Good tip 👍🏻
@jovial warren I figured out what this one was about. My bad in my code. Funny situation as I was having a FaceTime call with my girlfriend. I suddenly spotted the code in the background:
The "Image" module is not using "formats" like the "Picture" module does. It only use "Format" and one value. The build and deploy completed now 👍🏻