Skip to content
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

vite build error: sharp failed to load config #16

Open
chryzo opened this issue Jul 31, 2024 · 1 comment
Open

vite build error: sharp failed to load config #16

chryzo opened this issue Jul 31, 2024 · 1 comment

Comments

@chryzo
Copy link

chryzo commented Jul 31, 2024

Clean install on

Linux web2 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux

> [email protected] build
> vite build

failed to load config from /tmp/immich-33469747-36be-4dfb-893c-e1751a0cf9b1/web/vite.config.js
error during build:
Error: Could not load the "sharp" module using the linux-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
    npm install --include=optional sharp
    yarn add sharp --ignore-engines
- 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> (/tmp/immich-33469747-36be-4dfb-893c-e1751a0cf9b1/web/node_modules/sharp/lib/sharp.js:114:9)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/tmp/immich-33469747-36be-4dfb-893c-e1751a0cf9b1/web/node_modules/sharp/lib/constructor.js:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)

I have tried to install sharp earlier in the script, and specifying CPU, OS and glibc:

npm install --cpu=x64 --os=linux --libc=glibc sharp
@arter97
Copy link
Owner

arter97 commented Aug 15, 2024

Can you post full output from running install.sh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants