Skip to content

[Bug] Sharp error on docker compose startup from 4.4.7 #2396

@AdamCogswell

Description

@AdamCogswell

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Self-Hosted

Current Behavior

After updating my docker compose stack to 4.4.7 (and 5.0), the following errors appear on startup for the primary reactive-resume container:

> @reactive-resume/[email protected] prisma:migrate /app
> pnpm exec prisma migrate deploy
Prisma schema loaded from tools/prisma/schema.prisma
Datasource "db": PostgreSQL database "reactive_resume", schema "public" at "10.0.102.10:5432"
5 migrations found in prisma/migrations
No pending migrations to apply.
┌─────────────────────────────────────────────────────────┐
│  Update available 5.22.0 -> 6.16.3                      │
│                                                         │
│  This is a major update - please follow the guide at    │
│  https://pris.ly/d/major-version-upgrade                │
│                                                         │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘
> @reactive-resume/[email protected] start /app
> node dist/apps/server/main
/app/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/sharp.js:121
  throw new Error(help.join('\n'));
  ^
Error: Could not load the "sharp" module using the linux-x64 runtime
Unsupported CPU: Prebuilt binaries for linux-x64 require v2 microarchitecture
Possible solutions:
- Ensure optional dependencies can be installed:
    npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
    See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
    npm install --os=linux --cpu=x64 sharp
- Consult the installation documentation:
    See https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/sharp.js:121:9)
    at Module._compile (node:internal/modules/cjs/loader:1706:14)
    at Object..js (node:internal/modules/cjs/loader:1839:10)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)
    at Object.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/constructor.js:10:1)
Node.js v22.20.0
 ELIFECYCLE  Command failed with exit code 1.

Expected Behavior

Container starts without errors

Steps To Reproduce

  1. Change the version number for the container in docker compose to 4.4.7 or 5.0
  2. Pull matching image
  3. Start container

What browsers are you seeing the problem on?

No response

What template are you using?

None

Anything else?

I am running this via Portainer on a host that is backed by a modern i9 processor on the latest architecture. I don't believe my CPU is actually the problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds triageIssues that need to be triagedv4Issues related to the latest version

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions