Skip to content

Immich script fails at npm install --build-from-source sharpΒ #5921

@sneezybeno

Description

@sneezybeno

βœ… Have you read and understood the above guidelines?

yes

πŸ“œ What is the name of the script you are using?

Immich

πŸ“‚ What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/immich.sh)"

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 12

πŸ“ Provide a clear and concise description of the issue.

Immich script fails at npm install --build-from-source sharp.
It does the same regardless of yes/no for HW acceleration

Previously I have installed it successfully, maybe something changed meanwhile (in the past 2-3 weeks)

As far as I understand, the problem is at npm install --build-from-source sharp

πŸ”„ Steps to reproduce the issue.

  1. Install script on host with: ...
  2. Adjust resources
  3. Wait
  4. say "n" for HW acceleration
  5. wait more
  6. encounter error

❌ Paste the full error output (if available).

βœ”οΈ Installed machine-learning
⏳ Installing Immich CLInpm warn "sharp" is being parsed as a normal command line argument.
npm warn Unknown cli config "--build-from-source". This will stop working in the next major version of npm.
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup '/opt/immich/app/node_modules/msgpackr-extract',
npm warn cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/opt/immich/app/node_modules/msgpackr-extract/build/Release'] {
npm warn cleanup errno: -39,
npm warn cleanup code: 'ENOTEMPTY',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: '/opt/immich/app/node_modules/msgpackr-extract/build/Release'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path /opt/immich/app/node_modules/sharp
npm error command failed
npm error command sh -c node install/check.js
npm error sharp: Detected --build-from-source flag
npm error sharp: Attempting to build from source via node-gyp
npm error sharp: Found node-addon-api 8.3.1
npm error sharp: Found node-gyp 11.2.0
npm error sharp: See https://sharp.pixelplumbing.com/install#building-from-source
npm error
npm error make: Entering directory '/opt/immich/app/node_modules/sharp/src/build'
npm error CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
npm error rm -f Release/obj.target/../../node-addon-api/nothing.a Release/obj.target/../../node-addon-api/nothing.a.ar-file-list; mkdir -p dirname Release/obj.target/../../node-addon-api/nothing.a
npm error ar crs Release/obj.target/../../node-addon-api/nothing.a @Release/obj.target/../../node-addon-api/nothing.a.ar-file-list
npm error COPY Release/nothing.a
npm error TOUCH Release/obj.target/libvips-cpp-8.17.1.stamp
npm error CXX(target) Release/obj.target/sharp-linux-x64/common.o
npm error make: Leaving directory '/opt/immich/app/node_modules/sharp/src/build'
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | x64
npm error gyp info chdir src
npm error gyp info find Python using Python version 3.11.2 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/opt/immich/app/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/immich/app/node_modules/sharp/src/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/immich/app/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/22.17.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/22.17.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/opt/immich/app/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/22.17.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/opt/immich/app/node_modules/sharp/src',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ../common.cc:13:
npm error /usr/local/include/vips/vips8:41:10: fatal error: glib-object.h: No such file or directory
npm error 41 | #include <glib-object.h>
npm error | ^~~~~~~~~~~~~~~
npm error compilation terminated.
npm error make: *** [sharp-linux-x64.target.mk:147: Release/obj.target/sharp-linux-x64/common.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: make failed with exit code: 2
npm error gyp ERR! stack at ChildProcess. (/opt/immich/app/node_modules/node-gyp/lib/build.js:219:23)
npm error gyp ERR! System Linux 6.8.12-8-pve
npm error gyp ERR! command "/usr/bin/node" "/opt/immich/app/node_modules/.bin/node-gyp" "rebuild" "--directory=src"
npm error gyp ERR! cwd /opt/immich/app/node_modules/sharp/src
npm error gyp ERR! node -v v22.17.0
npm error gyp ERR! node-gyp -v v11.2.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-07-10T22_58_14_324Z-debug-0.log

[ERROR] in line 334: exit code 0: while executing command $STD npm install --build-from-source sharp

[ERROR] in line 1233: exit code 0: while executing command lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?

πŸ–ΌοΈ Additional context (optional).

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingexternalThis problem is external

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions