I’m trying to deploy my site. Everything worked perfectly up until I think I upgraded my Astro, Node.js and NPM. Now it seems it can’t find the Sharp library, even tho I have it installed in my own computer and works.
The better the post - the faster the answer.
- Netlify site name: animanoirxyz.netlify.app
- https://www.animanoir.xyz/
- Deploy log:
10:48:04 PM: build-image version: 006dca901dab83234b4881f914ac1a189ff41daa (focal)
10:48:04 PM: buildbot version: 85b96580a20a4d1c8162f558cac1ba041b0848da
10:48:04 PM: Building without cache
10:48:04 PM: Starting to prepare the repo for build
10:48:04 PM: No cached dependencies found. Cloning fresh repo
10:48:04 PM: git clone --filter=blob:none https://github.com/animanoir/Animanoir-Portfolio-2024
10:48:04 PM: Preparing Git Reference refs/heads/master
10:48:06 PM: Starting to install dependencies
10:48:06 PM: Python version set to 3.8
10:48:07 PM: Attempting Ruby version 2.7.2, read from environment
10:48:07 PM: Using Ruby version 2.7.2
10:48:08 PM: Started restoring cached go cache
10:48:08 PM: Finished restoring cached go cache
10:48:09 PM: go version go1.19.13 linux/amd64
10:48:10 PM: Using PHP version 8.0
10:48:12 PM: Downloading and installing node v20.15.0...
10:48:12 PM: Downloading https://nodejs.org/dist/v20.15.0/node-v20.15.0-linux-x64.tar.xz...
10:48:12 PM: Computing checksum with sha256sum
10:48:12 PM: Checksums matched!
10:48:14 PM: Now using node v20.15.0 (npm v10.7.0)
10:48:14 PM: Enabling Node.js Corepack
10:48:15 PM: Started restoring cached build plugins
10:48:15 PM: Finished restoring cached build plugins
10:48:15 PM: Started restoring cached corepack dependencies
10:48:15 PM: Finished restoring cached corepack dependencies
10:48:15 PM: Started restoring cached yarn cache
10:48:15 PM: Finished restoring cached yarn cache
10:48:15 PM: No yarn workspaces detected
10:48:15 PM: Started restoring cached node modules
10:48:15 PM: Finished restoring cached node modules
10:48:15 PM: Installing npm packages using Yarn version 1.22.19
10:48:15 PM: yarn install v1.22.19
10:48:15 PM: [1/4] Resolving packages...
10:48:16 PM: [2/4] Fetching packages...
10:48:27 PM: warning astro@4.11.3: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning sharp@0.33.4: The engine "libvips" appears to be invalid.
10:48:27 PM: warning @img/sharp-darwin-arm64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-darwin-arm64@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-darwin-x64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-darwin-x64@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-darwin-arm64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-darwin-arm64@1.0.2: The engine "macos" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-darwin-x64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-darwin-x64@1.0.2: The engine "macos" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-arm@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-arm@1.0.2: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-arm64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-arm64@1.0.2: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-s390x@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-s390x@1.0.2: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-x64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linux-x64@1.0.2: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linuxmusl-arm64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linuxmusl-arm64@1.0.2: The engine "musl" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linuxmusl-x64@1.0.2: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-libvips-linuxmusl-x64@1.0.2: The engine "musl" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-arm@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-arm@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-arm64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-arm64@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-s390x@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-s390x@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-x64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linux-x64@0.33.4: The engine "glibc" appears to be invalid.
10:48:27 PM: warning @img/sharp-linuxmusl-arm64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linuxmusl-arm64@0.33.4: The engine "musl" appears to be invalid.
10:48:27 PM: warning @img/sharp-linuxmusl-x64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-linuxmusl-x64@0.33.4: The engine "musl" appears to be invalid.
10:48:27 PM: warning @img/sharp-wasm32@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-win32-ia32@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: warning @img/sharp-win32-x64@0.33.4: The engine "pnpm" appears to be invalid.
10:48:27 PM: [3/4] Linking dependencies...
10:48:27 PM: warning "@astrojs/react > @vitejs/plugin-react@4.3.1" has unmet peer dependency "vite@^4.2.0 || ^5.0.0".
10:48:27 PM: warning "@react-three/drei > @monogrid/gainmap-js@3.0.5" has incorrect peer dependency "three@>= 0.159.0".
10:48:27 PM: warning " > astro-embed@0.5.1" has incorrect peer dependency "astro@^2.0.0 || ^3.0.0-beta".
10:48:27 PM: warning "astro-embed > @astro-community/astro-embed-integration@0.5.1" has incorrect peer dependency "astro@^2.0.0 || ^3.0.0-beta".
10:48:27 PM: warning "astro-embed > @astro-community/astro-embed-integration > astro-auto-import@0.3.2" has incorrect peer dependency "astro@^2.0.0 || ^3.0.0-beta".
10:48:27 PM: warning "astro-seo > @astrojs/check@0.5.10" has unmet peer dependency "typescript@^5.0.0".
10:48:27 PM: warning "astro-seo > @astrojs/check > @astrojs/language-server > @volar/kit@2.2.5" has unmet peer dependency "typescript@*".
10:48:27 PM: warning Workspaces can only be enabled in private projects.
10:48:30 PM: [4/4] Building fresh packages...
10:48:32 PM: Done in 16.60s.
10:48:32 PM: npm packages installed using Yarn
10:48:32 PM: Successfully installed dependencies
10:48:33 PM: Starting build script
10:48:34 PM: Detected 1 framework(s)
10:48:34 PM: "astro" at version "4.11.3"
10:48:34 PM: Section completed: initializing
10:48:35 PM:
10:48:35 PM: Netlify Build
10:48:35 PM: ────────────────────────────────────────────────────────────────
10:48:35 PM:
10:48:35 PM: ❯ Version
10:48:35 PM: @netlify/build 29.50.0
10:48:35 PM:
10:48:35 PM: ❯ Flags
10:48:35 PM: baseRelDir: true
10:48:35 PM: buildId: 667e407965c136a7a21cd274
10:48:35 PM: deployId: 667e407965c136a7a21cd276
10:48:35 PM:
10:48:35 PM: ❯ Current directory
10:48:35 PM: /opt/build/repo
10:48:35 PM:
10:48:35 PM: ❯ Config file
10:48:35 PM: No config file was defined: using default values.
10:48:35 PM:
10:48:35 PM: ❯ Context
10:48:35 PM: production
10:48:35 PM:
10:48:35 PM: Build command from Netlify app
10:48:35 PM: ────────────────────────────────────────────────────────────────
10:48:35 PM:
10:48:35 PM: $ astro build
10:48:36 PM: 04:48:36 [types] Added src/env.d.ts type declarations.
10:48:36 PM: 04:48:36 [types] Added src/env.d.ts type declarations.
10:48:36 PM: 04:48:36 [build] output: "static"
10:48:36 PM: 04:48:36 [build] directory: /opt/build/repo/dist/
10:48:36 PM: 04:48:36 [build] Collecting build info...
10:48:36 PM: 04:48:36 [build] ✓ Completed in 328ms.
10:48:36 PM: 04:48:36 [build] Building static entrypoints...
10:48:36 PM: 04:48:36 [types] Added src/env.d.ts type declarations.
10:48:38 PM: 04:48:38 [vite] ✓ built in 1.35s
10:48:38 PM: 04:48:38 [build] ✓ Completed in 1.38s.
10:48:38 PM: building client (vite)
10:48:38 PM: 04:48:38 [types] Added src/env.d.ts type declarations.
10:48:38 PM: 04:48:38 [vite] transforming...
10:48:41 PM: node_modules/three-stdlib/libs/lottie.js (13062:32): Use of eval in "node_modules/three-stdlib/libs/lottie.js" is strongly discouraged as it poses security risks and may cause issues with minification.
10:48:42 PM: 04:48:42 [vite] ✓ 724 modules transformed.
10:48:42 PM: 04:48:42 [vite] rendering chunks...
10:48:43 PM: 04:48:43 [vite] computing gzip size...
10:48:43 PM: 04:48:43 [vite] dist/_astro/index.mB91UUOC.css 0.24 kB │ gzip: 0.19 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/aboutMe.5b-PFsC0.css 0.52 kB │ gzip: 0.29 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/index.DOVcSTr2.css 0.55 kB │ gzip: 0.38 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/page.CL53MQip.js 0.04 kB │ gzip: 0.06 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/jsx-runtime.CYYqVSlZ.js 0.92 kB │ gzip: 0.58 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/Vimeo.astro_astro_type_script_index_0_lang.CgRsrQuG.js 1.41 kB │ gzip: 0.68 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/LastFm.Bwfux2iE.js 1.51 kB │ gzip: 0.85 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/index.Br8Mt3iK.js 2.47 kB │ gzip: 1.09 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/YouTube.astro_astro_type_script_index_0_lang.DkY74W4p.js 3.18 kB │ gzip: 1.36 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/MutatingSubheader.DfFXdCiy.js 3.61 kB │ gzip: 1.64 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/MutatingAbout.DtuKNuL-.js 3.86 kB │ gzip: 2.11 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/index.DJO9vBfz.js 6.96 kB │ gzip: 2.78 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/hoisted.ChwPGmsw.js 12.02 kB │ gzip: 4.14 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/lodash.BAqmL72y.js 71.83 kB │ gzip: 26.66 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/client.DRsCJ7vl.js 135.60 kB │ gzip: 43.81 kB
10:48:43 PM: 04:48:43 [vite] dist/_astro/FiberContainer.D9AllFtT.js 984.61 kB │ gzip: 270.44 kB
10:48:43 PM: 04:48:43 [WARN] [vite]
10:48:43 PM: (!) Some chunks are larger than 500 kB after minification. Consider:
10:48:43 PM: - Using dynamic import() to code-split the application
10:48:43 PM: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
10:48:43 PM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
10:48:43 PM: 04:48:43 [vite] ✓ built in 5.12s
10:48:43 PM: generating static routes
10:48:43 PM: 04:48:43 ▶ src/pages/aboutMe.astro
10:48:43 PM: 04:48:43 └─ /aboutMe/index.htmlhttps://animanoir.xyz/images/about/%C3%B3scar-a-montiel-animanoir-geosmina.jpg
10:48:43 PM: (+16ms)
10:48:43 PM: 04:48:43 ▶ src/pages/blog/index.astro
10:48:43 PM: 04:48:43 └─ /blog/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+4ms)
10:48:43 PM: 04:48:43 ▶ src/pages/blog/[...slug].astro
10:48:43 PM: 04:48:43 ├─ /blog/2023/how-to-patch-a-node-module-pack-package/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+10ms)
10:48:43 PM: 04:48:43 └─ /blog/2023/maxmsp-taller-cdl-unam/index.htmlhttps://animanoir.xyz/images/auroras-digitales-max-msp-cover-optim-2.jpg
10:48:43 PM: (+7ms)
10:48:43 PM: 04:48:43 λ src/pages/rss.xml.js
10:48:43 PM: 04:48:43 └─ /rss.xml04:48:43 [WARN] [router] No API Route handler exists for the method "GET" for the route "/rss.xml".
10:48:43 PM: Found handlers: "get"
10:48:43 PM: (+0ms)
10:48:43 PM: 04:48:43 ▶ src/pages/works/index.astro
10:48:43 PM: 04:48:43 └─ /works/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+6ms)
10:48:43 PM: 04:48:43 ▶ src/pages/works/[...slug].astro
10:48:43 PM: 04:48:43 ├─ /works/2020/web-development/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+5ms)
10:48:43 PM: 04:48:43 ├─ /works/2021/arqueologia-flickeriana/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+6ms)
10:48:43 PM: 04:48:43 ├─ /works/2021/jardines/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+4ms)
10:48:43 PM: 04:48:43 ├─ /works/2021/visuals/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+63ms)
10:48:43 PM: 04:48:43 ├─ /works/2022/metaxis-digital/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+5ms)
10:48:43 PM: 04:48:43 └─ /works/2023/voz-y-movimiento/index.htmlhttps://animanoir.xyz/images/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+6ms)
10:48:43 PM: 04:48:43 ▶ src/pages/index.astro
10:48:43 PM: 04:48:43 └─ /index.htmlhttps://animanoir.xyz/animanoir-oscar-a-montiel-tw.jpg
10:48:43 PM: (+9ms)
10:48:43 PM: 04:48:43 ✓ Completed in 693ms.
10:48:43 PM:
10:48:43 PM: generating optimized images
10:48:44 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
**10:48:44 PM: [CouldNotTransformImage] Could not transform image `/_astro/oscar-a-montiel-animanoir-geosmina.DsrPOgKz.jpg`. See the stack trace for more information.**
**10:48:44 PM: Hint:**
**10:48:44 PM: This is often caused by a corrupted or malformed image. Re-exporting the image from your image editor may fix this issue.**
**10:48:44 PM: Error reference:**
**10:48:44 PM: https://docs.astro.build/en/reference/errors/could-not-transform-image/**
**10:48:44 PM: Stack trace:**
**10:48:44 PM: at generateImageInternal (file:///opt/build/repo/node_modules/astro/dist/assets/build/generate.js:131:21)**
**10:48:44 PM: at async file:///opt/build/repo/node_modules/p-queue/dist/index.js:187:36**
**10:48:44 PM: Caused by:**
**10:48:44 PM: Could not find Sharp. Please install Sharp (`sharp`) manually into your project or migrate to another image service.**
**10:48:44 PM: at loadSharp (file:///opt/build/repo/dist/chunks/astro/assets-service_dKrzgqTF.mjs:510:11)**
10:48:44 PM: at async generateImageInternal (file:///opt/build/repo/node_modules/astro/dist/assets/build/generate.js:125:26)
10:48:44 PM: at async file:///opt/build/repo/node_modules/p-queue/dist/index.js:187:36
10:48:44 PM:
10:48:44 PM: "build.command" failed
10:48:44 PM: ────────────────────────────────────────────────────────────────
10:48:44 PM:
10:48:44 PM: Error message
10:48:44 PM: Command failed with exit code 1: astro build (https://ntl.fyi/exit-code-1)
10:48:44 PM:
10:48:44 PM: Error location
10:48:44 PM: In Build command from Netlify app:
10:48:44 PM: astro build
10:48:44 PM:
10:48:44 PM: Resolved config
10:48:44 PM: build:
10:48:44 PM: command: astro build
10:48:44 PM: commandOrigin: ui
10:48:44 PM: publish: /opt/build/repo/dist
10:48:44 PM: publishOrigin: ui
10:48:44 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:48:44 PM: Failing build: Failed to build site
10:48:44 PM: Finished processing build request in 40.911s