[GH-ISSUE #876] [Bug]: yarn-install fails because of the name of the folder a level above actual-server #7280

Closed
opened 2026-04-10 17:02:19 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @wojciechbielecki on GitHub (Apr 8, 2023).
Original GitHub issue: https://github.com/actualbudget/actual/issues/876

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

The name of the folder that actual-server is cloned into might cause yarn-install to fail (better-sqlite3 build fail).

I'm running on macOS 13.2.1 (M2), latest version of node installed via brew.

In my home directory I created a folder with a name "Actual Budget". Then in the terminal I navigated to that folder and pasted the git clone command. Following that I ran yarn install, which failed while building better-sqlite3:
➤ YN0009: │ better-sqlite3@npm:8.2.0 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/rk/_hmpwzss0gn31q7g7667jmj40000gn/T/xfs-aa2b6d34/build.log)
At the same time a new folder was created in my home directory named "Actual". I guessed the name of the folder in which actual-server resides might be an issue and renamed it from "Actual Budget" to "ab". Then I ran yarn install again and it completed successfully.

What error did you receive?

The log file is attached below
# This file contains the result of Yarn building a package (better-sqlite3@npm:8.2.0)
# Script name: install

prebuild-install warn install No prebuilt binaries found (target=19.8.1 runtime=node arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@19.8.1 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/wb/Actual Budget/actual-server/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   '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/wb/Library/Caches/node-gyp/19.8.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/wb/Library/Caches/node-gyp/19.8.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/wb/Actual Budget/actual-server/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/wb/Library/Caches/node-gyp/19.8.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/wb/Actual Budget/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' ]
  TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
/bin/sh: Budget/actual-server/node_modules/better-sqlite3/build/Release/lib.host:/Users/wb/Actual: No such file or directory
node:internal/fs/utils:346
    throw err;
    ^

Error: ENOENT: no such file or directory, copyfile '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c' -> '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c'
    at Object.copyFileSync (node:fs:2902:3)
    at Object.<anonymous> (/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/copy.js:25:5)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -2,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c',
  dest: '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c'
}

Node.js v19.8.1
make: *** [ba23eeee118cd63e16015df367567cb043fed872.intermediate] Error 1
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command "/opt/homebrew/Cellar/node/19.8.1/bin/node" "/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3
gyp ERR! node -v v19.8.1
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

No response

Operating System

Mac OSX

Originally created by @wojciechbielecki on GitHub (Apr 8, 2023). Original GitHub issue: https://github.com/actualbudget/actual/issues/876 ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### What happened? The name of the folder that actual-server is cloned into might cause yarn-install to fail (better-sqlite3 build fail). I'm running on macOS 13.2.1 (M2), latest version of node installed via brew. In my home directory I created a folder with a name "Actual Budget". Then in the terminal I navigated to that folder and pasted the git clone command. Following that I ran `yarn install`, which failed while building better-sqlite3: `➤ YN0009: │ better-sqlite3@npm:8.2.0 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/rk/_hmpwzss0gn31q7g7667jmj40000gn/T/xfs-aa2b6d34/build.log)` At the same time a new folder was created in my home directory named "Actual". I guessed the name of the folder in which actual-server resides might be an issue and renamed it from "Actual Budget" to "ab". Then I ran `yarn install` again and it completed successfully. ### What error did you receive? <details> <summary>The log file is attached below</summary> ``` # This file contains the result of Yarn building a package (better-sqlite3@npm:8.2.0) # Script name: install prebuild-install warn install No prebuilt binaries found (target=19.8.1 runtime=node arch=arm64 libc= platform=darwin) gyp info it worked if it ends with ok gyp info using node-gyp@9.3.1 gyp info using node@19.8.1 | darwin | arm64 gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3" gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3 gyp info spawn args [ gyp info spawn args '/Users/wb/Actual Budget/actual-server/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 '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/wb/Library/Caches/node-gyp/19.8.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/wb/Library/Caches/node-gyp/19.8.1', gyp info spawn args '-Dnode_gyp_dir=/Users/wb/Actual Budget/actual-server/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/wb/Library/Caches/node-gyp/19.8.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/wb/Actual Budget/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' ] TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate /bin/sh: Budget/actual-server/node_modules/better-sqlite3/build/Release/lib.host:/Users/wb/Actual: No such file or directory node:internal/fs/utils:346 throw err; ^ Error: ENOENT: no such file or directory, copyfile '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c' -> '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c' at Object.copyFileSync (node:fs:2902:3) at Object.<anonymous> (/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/copy.js:25:5) at Module._compile (node:internal/modules/cjs/loader:1275:14) at Module._extensions..js (node:internal/modules/cjs/loader:1329:10) at Module.load (node:internal/modules/cjs/loader:1133:32) at Module._load (node:internal/modules/cjs/loader:972:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { errno: -2, syscall: 'copyfile', code: 'ENOENT', path: '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c', dest: '/Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c' } Node.js v19.8.1 make: *** [ba23eeee118cd63e16015df367567cb043fed872.intermediate] Error 1 rm ba23eeee118cd63e16015df367567cb043fed872.intermediate gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/lib/build.js:203:23) gyp ERR! stack at ChildProcess.emit (node:events:512:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12) gyp ERR! System Darwin 22.3.0 gyp ERR! command "/opt/homebrew/Cellar/node/19.8.1/bin/node" "/Users/wb/Actual Budget/actual-server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /Users/wb/Actual Budget/actual-server/node_modules/better-sqlite3 gyp ERR! node -v v19.8.1 gyp ERR! node-gyp -v v9.3.1 gyp ERR! not ok ``` </details> ### Where are you hosting Actual? Locally via Yarn ### What browsers are you seeing the problem on? _No response_ ### Operating System Mac OSX
GiteaMirror added the bugupstream labels 2026-04-10 17:02:20 -05:00
Author
Owner

@j-f1 commented on GitHub (Apr 8, 2023):

Hi! This looks like an issue in either better-sqlite3 or node-gyp or one of their dependencies. I don’t think there’s anything we can do to fix it here, but please report it to them so they can get it fixed.

<!-- gh-comment-id:1500878860 --> @j-f1 commented on GitHub (Apr 8, 2023): Hi! This looks like an issue in either `better-sqlite3` or `node-gyp` or one of their dependencies. I don’t think there’s anything we can do to fix it here, but please report it to them so they can get it fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#7280