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

Closed
opened 2026-02-04 23:58:50 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @sneezybeno on GitHub (Jul 11, 2025).

Originally assigned to: @vhsdream on GitHub.

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 inflight@1.0.6: 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 npmlog@5.0.1: This package is no longer supported.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated gauge@3.0.2: 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 node-gyp@11.2.0
npm error gyp info using node@22.17.0 | 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

Originally created by @sneezybeno on GitHub (Jul 11, 2025). Originally assigned to: @vhsdream on GitHub. ### ✅ 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? - [x] 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 inflight@1.0.6: 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 npmlog@5.0.1: This package is no longer supported. npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported. npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated gauge@3.0.2: 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 node-gyp@11.2.0 npm error gyp info using node@22.17.0 | 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.<anonymous> (/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_
OVERLORD added the bugexternal labels 2026-02-04 23:58:50 +03:00
Author
Owner

@vhsdream commented on GitHub (Jul 11, 2025):

@sneezybeno Hmm this is new. Must be suddenly deprecated in Node or NPM or something.

Working on a fix now.

@vhsdream commented on GitHub (Jul 11, 2025): @sneezybeno Hmm this is new. Must be suddenly deprecated in Node or NPM or something. Working on a fix now.
Author
Owner

@MickLesk commented on GitHub (Jul 11, 2025):

work fine

Image
@MickLesk commented on GitHub (Jul 11, 2025): work fine <img width="453" height="438" alt="Image" src="https://github.com/user-attachments/assets/3a6d6979-7614-49b1-8977-227c369f3f2a" />
Author
Owner

@vhsdream commented on GitHub (Jul 11, 2025):

Fails for me, even with the fix.

Reason: Sharp's new version requires libvips 8.17.1+ and Immich is still using 8.16.

@vhsdream commented on GitHub (Jul 11, 2025): Fails for me, even with the fix. Reason: Sharp's new version requires [libvips 8.17.1+](https://sharp.pixelplumbing.com/changelog/) and Immich is still using 8.16.
Author
Owner

@MickLesk commented on GitHub (Jul 11, 2025):

Nice 😄

@MickLesk commented on GitHub (Jul 11, 2025): Nice 😄
Author
Owner

@vhsdream commented on GitHub (Jul 11, 2025):

I'm not sure how to handle this one. Force the install of sharp 0.34.2 (edit the package.json) and wait for libvips to be updated, or build the new libvips revision before the Immich base repo does?

@vhsdream commented on GitHub (Jul 11, 2025): I'm not sure how to handle this one. Force the install of sharp 0.34.2 (edit the package.json) and wait for libvips to be updated, or build the new libvips revision before the Immich base repo does?
Author
Owner

@sneezybeno commented on GitHub (Jul 12, 2025):

you guys rock!

Image
@sneezybeno commented on GitHub (Jul 12, 2025): you guys rock! <img width="818" height="510" alt="Image" src="https://github.com/user-attachments/assets/9a2836b7-3159-4ed8-b926-0974b34b1e6a" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1259