[GH-ISSUE #26] yarn install fails with build error #25862

Closed
opened 2026-04-18 01:40:22 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @mrtumnus on GitHub (May 2, 2022).
Original GitHub issue: https://github.com/actualbudget/actual/issues/26

I attempted to install actual-server on a fresh Debian 11 LXC container. Here's the steps I took:

  1. Add nodejs apt source
  2. Install nodejs
  3. Enable corepack (for yarn)
  4. Clone the repo
  5. Build the code (fails)

Commands:

curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install nodejs
corepack enable
git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install

Error output:

yarn install v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > eslint-config-react-app@3.0.6" has incorrect peer dependency "babel-eslint@9.x".
warning " > eslint-config-react-app@3.0.6" has incorrect peer dependency "eslint-plugin-flowtype@2.x".
[4/4] Building fresh packages...
[1/2] ⠐ better-sqlite3
error /root/actual-server/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: /root/actual-server/node_modules/better-sqlite3
Output:
prebuild-install WARN install No prebuilt binaries found (target=18.0.0 runtime=node arch=x64 libc= platform=linux)

> better-sqlite3@7.5.0 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@18.0.0 | linux | x64
gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v18.0.0/node-v18.0.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v18.0.0/node-v18.0.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v18.0.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v18.0.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/actual-server/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/18.0.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/18.0.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/18.0.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/actual-server/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
gyp ERR! stack     at new Promise (<anonymous>)
gyp ERR! stack     at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
gyp ERR! stack     at new Promise (<anonymous>)
gyp ERR! stack     at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! System Linux 5.4.157-1-pve
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /root/actual-server/node_modules/better-sqlite3
gyp ERR! node -v v18.0.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
npm notice
npm notice New minor version of npm available! 8.6.0 -> 8.8.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.8.0>
npm notice Run `npm install -g npm@8.8.0` to update!
npm notice
Originally created by @mrtumnus on GitHub (May 2, 2022). Original GitHub issue: https://github.com/actualbudget/actual/issues/26 I attempted to install actual-server on a fresh Debian 11 LXC container. Here's the steps I took: 1. Add nodejs apt source 2. Install nodejs 3. Enable corepack (for yarn) 4. Clone the repo 5. Build the code (fails) Commands: ``` curl -fsSL https://deb.nodesource.com/setup_18.x | bash - apt install nodejs corepack enable git clone https://github.com/actualbudget/actual-server.git cd actual-server yarn install ``` Error output: ``` yarn install v1.22.15 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... warning " > eslint-config-react-app@3.0.6" has incorrect peer dependency "babel-eslint@9.x". warning " > eslint-config-react-app@3.0.6" has incorrect peer dependency "eslint-plugin-flowtype@2.x". [4/4] Building fresh packages... [1/2] ⠐ better-sqlite3 error /root/actual-server/node_modules/better-sqlite3: Command failed. Exit code: 1 Command: prebuild-install || npm run build-release Arguments: Directory: /root/actual-server/node_modules/better-sqlite3 Output: prebuild-install WARN install No prebuilt binaries found (target=18.0.0 runtime=node arch=x64 libc= platform=linux) > better-sqlite3@7.5.0 build-release > node-gyp rebuild --release gyp info it worked if it ends with ok gyp info using node-gyp@9.0.0 gyp info using node@18.0.0 | linux | x64 gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" gyp http GET https://nodejs.org/download/release/v18.0.0/node-v18.0.0-headers.tar.gz gyp http 200 https://nodejs.org/download/release/v18.0.0/node-v18.0.0-headers.tar.gz gyp http GET https://nodejs.org/download/release/v18.0.0/SHASUMS256.txt gyp http 200 https://nodejs.org/download/release/v18.0.0/SHASUMS256.txt gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/root/actual-server/node_modules/better-sqlite3/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.cache/node-gyp/18.0.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.0.0', gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.0.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/root/actual-server/node_modules/better-sqlite3', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18 gyp ERR! stack at new Promise (<anonymous>) gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22 gyp ERR! stack at new Promise (<anonymous>) gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! System Linux 5.4.157-1-pve gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /root/actual-server/node_modules/better-sqlite3 gyp ERR! node -v v18.0.0 gyp ERR! node-gyp -v v9.0.0 gyp ERR! not ok npm notice npm notice New minor version of npm available! 8.6.0 -> 8.8.0 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.8.0> npm notice Run `npm install -g npm@8.8.0` to update! npm notice ```
Author
Owner

@mrtumnus commented on GitHub (May 2, 2022):

Installed make via build-essentials, and now a different error is showing:

yarn install v1.22.15
info No lockfile found.
[1/4] Resolving packages...
warning @actual-app/api > uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > eslint-config-react-app@3.0.8" has incorrect peer dependency "babel-eslint@9.x".
warning " > eslint-config-react-app@3.0.8" has incorrect peer dependency "eslint-plugin-flowtype@2.x".
[4/4] Building fresh packages...
[1/3] ⠂ better-sqlite3
[-/3] ⠂ waiting...
error /root/actual-server/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: /root/actual-server/node_modules/better-sqlite3
Output:
prebuild-install WARN install No prebuilt binaries found (target=18.0.0 runtime=node arch=x64 libc= platform=linux)

> better-sqlite3@7.5.1 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@18.0.0 | linux | x64
gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/actual-server/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/18.0.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/18.0.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/18.0.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/actual-server/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/root/actual-server/node_modules/better-sqlite3/build'
  TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
  TOUCH Release/obj.target/deps/locate_sqlite3.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
cc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [deps/sqlite3.target.mk:203: Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.4.157-1-pve
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /root/actual-server/node_modules/better-sqlite3
gyp ERR! node -v v18.0.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
<!-- gh-comment-id:1115212109 --> @mrtumnus commented on GitHub (May 2, 2022): Installed `make` via `build-essentials`, and now a different error is showing: ``` yarn install v1.22.15 info No lockfile found. [1/4] Resolving packages... warning @actual-app/api > uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. [2/4] Fetching packages... [3/4] Linking dependencies... warning " > eslint-config-react-app@3.0.8" has incorrect peer dependency "babel-eslint@9.x". warning " > eslint-config-react-app@3.0.8" has incorrect peer dependency "eslint-plugin-flowtype@2.x". [4/4] Building fresh packages... [1/3] ⠂ better-sqlite3 [-/3] ⠂ waiting... error /root/actual-server/node_modules/better-sqlite3: Command failed. Exit code: 1 Command: prebuild-install || npm run build-release Arguments: Directory: /root/actual-server/node_modules/better-sqlite3 Output: prebuild-install WARN install No prebuilt binaries found (target=18.0.0 runtime=node arch=x64 libc= platform=linux) > better-sqlite3@7.5.1 build-release > node-gyp rebuild --release gyp info it worked if it ends with ok gyp info using node-gyp@9.0.0 gyp info using node@18.0.0 | linux | x64 gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/root/actual-server/node_modules/better-sqlite3/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.cache/node-gyp/18.0.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.0.0', gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.0.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/root/actual-server/node_modules/better-sqlite3', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/root/actual-server/node_modules/better-sqlite3/build' TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate TOUCH Release/obj.target/deps/locate_sqlite3.stamp CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o cc: fatal error: Killed signal terminated program cc1 compilation terminated. make: *** [deps/sqlite3.target.mk:203: Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:527:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Linux 5.4.157-1-pve gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /root/actual-server/node_modules/better-sqlite3 gyp ERR! node -v v18.0.0 gyp ERR! node-gyp -v v9.0.0 gyp ERR! not ok rm ba23eeee118cd63e16015df367567cb043fed872.intermediate ```
Author
Owner

@mrtumnus commented on GitHub (May 2, 2022):

Looks like I just needed to clean up from the first failed install attempt. After a fresh clone && yarn install, the build succeeded. To summarize, here's what I needed to do to install this on a fresh Debian 11 system:

curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install nodejs build-essential
corepack enable
git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install
yarn start
<!-- gh-comment-id:1115224386 --> @mrtumnus commented on GitHub (May 2, 2022): Looks like I just needed to clean up from the first failed install attempt. After a fresh clone && `yarn install`, the build succeeded. To summarize, here's what I needed to do to install this on a fresh Debian 11 system: ``` curl -fsSL https://deb.nodesource.com/setup_18.x | bash - apt install nodejs build-essential corepack enable git clone https://github.com/actualbudget/actual-server.git cd actual-server yarn install yarn start ```
Author
Owner

@borasura commented on GitHub (May 3, 2022):

@mrtumnus Thanks very much for the instructions. My build is successfull now but facing issues when running the browser version. Details here - https://github.com/actualbudget/actual/issues/30

I was wondering if you faced any such issues and how you resolved them. Thanks!

<!-- gh-comment-id:1115735914 --> @borasura commented on GitHub (May 3, 2022): @mrtumnus Thanks very much for the instructions. My build is successfull now but facing issues when running the browser version. Details here - https://github.com/actualbudget/actual/issues/30 I was wondering if you faced any such issues and how you resolved them. Thanks!
Author
Owner

@mrtumnus commented on GitHub (May 3, 2022):

@borasura I did not see that particular issue. Might want to include more log details, as there might have been something during the install that went wrong.

<!-- gh-comment-id:1116125063 --> @mrtumnus commented on GitHub (May 3, 2022): @borasura I did not see that particular issue. Might want to include more log details, as there might have been something during the install that went wrong.
Author
Owner

@cameronj86 commented on GitHub (Sep 21, 2023):

Looks like I just needed to clean up from the first failed install attempt. After a fresh clone && yarn install, the build succeeded. To summarize, here's what I needed to do to install this on a fresh Debian 11 system:

curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install nodejs build-essential
corepack enable
git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install
yarn start

These steps worked for me in 2023 (I installed the latest nodejs for Debian if that makes any difference)

I initially saw the logs referencing 'make' not being installed and just downloaded that package, and it still failed, but when I also installed build essentials, that did the trick.

<!-- gh-comment-id:1728715349 --> @cameronj86 commented on GitHub (Sep 21, 2023): > Looks like I just needed to clean up from the first failed install attempt. After a fresh clone && `yarn install`, the build succeeded. To summarize, here's what I needed to do to install this on a fresh Debian 11 system: > > ``` > curl -fsSL https://deb.nodesource.com/setup_18.x | bash - > apt install nodejs build-essential > corepack enable > git clone https://github.com/actualbudget/actual-server.git > cd actual-server > yarn install > yarn start > ``` These steps worked for me in 2023 (I installed the [latest nodejs](https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions) for Debian if that makes any difference) I initially saw the logs referencing 'make' not being installed and just downloaded that package, and it still failed, but when I also installed build essentials, that did the trick.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#25862