[Bug]: npm install --save @actual-app/api FAILS #2321

Closed
opened 2026-02-28 20:10:26 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @dsolera on GitHub (Jul 28, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

When trying to install the API npm package inside a Alipine container (more precisely, a container created from node:current-alpine), the RUN npm install --save @actual-app/api command fails with the following error:

npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm error code 1
npm error path /usr/src/app/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error make: Entering directory '/usr/src/app/node_modules/better-sqlite3/build'
npm error   TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error   ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error   TOUCH Release/obj.target/deps/locate_sqlite3.stamp
npm error   CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
npm error rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error make: Leaving directory '/usr/src/app/node_modules/better-sqlite3/build'
npm error (node:19) [DEP0176] DeprecationWarning: fs.R_OK is deprecated, use fs.constants.R_OK instead
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error prebuild-install warn install No prebuilt binaries found (target=24.4.1 runtime=node arch=x64 libc=musl platform=linux)
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@24.4.1 | linux | x64
npm error gyp info find Python using Python version 3.12.11 found at "/usr/bin/python3"
npm error gyp http GET https://unofficial-builds.nodejs.org/download/release/v24.4.1/node-v24.4.1-headers.tar.gz
npm error gyp http 200 https://unofficial-builds.nodejs.org/download/release/v24.4.1/node-v24.4.1-headers.tar.gz
npm error gyp http GET https://unofficial-builds.nodejs.org/download/release/v24.4.1/SHASUMS256.txt
npm error gyp http 200 https://unofficial-builds.nodejs.org/download/release/v24.4.1/SHASUMS256.txt
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/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 '/usr/src/app/node_modules/better-sqlite3/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/24.4.1/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/24.4.1',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/24.4.1/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/usr/src/app/node_modules/better-sqlite3',
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 make: cc: No such file or directory
npm error make: *** [deps/sqlite3.target.mk:200: Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 127
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> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:219:23)
npm error gyp ERR! System Linux 4.4.302+
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /usr/src/app/node_modules/better-sqlite3
npm error gyp ERR! node -v v24.4.1
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-28T12_06_18_497Z-debug-0.log

I'm running this on a Synology NAS running Linux.

How can we reproduce the issue?

Dockerfile:

FROM node:current-alpine

WORKDIR /usr/src/app

COPY package*.json ./

RUN apk add --no-cache python3 make

RUN npm install -g npm
RUN npm install --save @actual-app/api

RUN npm install

COPY . .

CMD ["npm", "start"]

I build the image with: docker build ./ --tag ds/bank-proc

Any advice on how to fix the issue? The Node environment in that container works as I can run a hello world program.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

No response

Operating System

Linux

Originally created by @dsolera on GitHub (Jul 28, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? When trying to install the API npm package inside a Alipine container (more precisely, a container created from `node:current-alpine`), the `RUN npm install --save @actual-app/api` command fails with the following error: ``` npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead npm error code 1 npm error path /usr/src/app/node_modules/better-sqlite3 npm error command failed npm error command sh -c prebuild-install || node-gyp rebuild --release npm error make: Entering directory '/usr/src/app/node_modules/better-sqlite3/build' npm error TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate npm error ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate npm error TOUCH Release/obj.target/deps/locate_sqlite3.stamp npm error CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o npm error rm ba23eeee118cd63e16015df367567cb043fed872.intermediate npm error make: Leaving directory '/usr/src/app/node_modules/better-sqlite3/build' npm error (node:19) [DEP0176] DeprecationWarning: fs.R_OK is deprecated, use fs.constants.R_OK instead npm error (Use `node --trace-deprecation ...` to show where the warning was created) npm error prebuild-install warn install No prebuilt binaries found (target=24.4.1 runtime=node arch=x64 libc=musl platform=linux) 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@24.4.1 | linux | x64 npm error gyp info find Python using Python version 3.12.11 found at "/usr/bin/python3" npm error gyp http GET https://unofficial-builds.nodejs.org/download/release/v24.4.1/node-v24.4.1-headers.tar.gz npm error gyp http 200 https://unofficial-builds.nodejs.org/download/release/v24.4.1/node-v24.4.1-headers.tar.gz npm error gyp http GET https://unofficial-builds.nodejs.org/download/release/v24.4.1/SHASUMS256.txt npm error gyp http 200 https://unofficial-builds.nodejs.org/download/release/v24.4.1/SHASUMS256.txt npm error gyp info spawn /usr/bin/python3 npm error gyp info spawn args [ npm error gyp info spawn args '/usr/local/lib/node_modules/npm/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 '/usr/src/app/node_modules/better-sqlite3/build/config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/root/.cache/node-gyp/24.4.1/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/24.4.1', npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/24.4.1/<(target_arch)/node.lib', npm error gyp info spawn args '-Dmodule_root_dir=/usr/src/app/node_modules/better-sqlite3', 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 make: cc: No such file or directory npm error make: *** [deps/sqlite3.target.mk:200: Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 127 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> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:219:23) npm error gyp ERR! System Linux 4.4.302+ npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" npm error gyp ERR! cwd /usr/src/app/node_modules/better-sqlite3 npm error gyp ERR! node -v v24.4.1 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-28T12_06_18_497Z-debug-0.log ``` I'm running this on a Synology NAS running Linux. ### How can we reproduce the issue? Dockerfile: ```dockerfile FROM node:current-alpine WORKDIR /usr/src/app COPY package*.json ./ RUN apk add --no-cache python3 make RUN npm install -g npm RUN npm install --save @actual-app/api RUN npm install COPY . . CMD ["npm", "start"] ``` I build the image with: `docker build ./ --tag ds/bank-proc` Any advice on how to fix the issue? The Node environment in that container works as I can run a hello world program. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? _No response_ ### Operating System Linux
GiteaMirror added the bug label 2026-02-28 20:10:26 -06:00
Author
Owner

@jfdoming commented on GitHub (Jul 28, 2025):

Hey! We generally provide tech support on the Discord server—you should find more folks available to help there. (That said, looks like you're missing a c/c++ toolchain, specifically the cc command. You can apk add build-base IIRC.)

@jfdoming commented on GitHub (Jul 28, 2025): Hey! We generally provide tech support on the Discord server—you should find more folks available to help there. (That said, looks like you're missing a c/c++ toolchain, specifically the cc command. You can `apk add build-base` IIRC.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2321