[GH-ISSUE #120] yarn install error #49231

Closed
opened 2026-04-30 10:27:04 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @tjex on GitHub (Jul 4, 2022).
Original GitHub issue: https://github.com/actualbudget/actual/issues/120

Attempting a fresh install as per readme documentation.

git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install

Results in an error.
Release/obj/gen/sqlite3/sqlite3.c:13700:10: fatal error: 'stdio.h' file not found

I looked at line 13700 of sqlite3.c, but the line is not dealing with stdio.h...
Error log attached.
yarn install debug log

npm update(in /actual-server) also throws errors about sqlite3.
npm update debug log

Using an m1max macbook pro.

Originally created by @tjex on GitHub (Jul 4, 2022). Original GitHub issue: https://github.com/actualbudget/actual/issues/120 Attempting a fresh install as per readme documentation. ``` git clone https://github.com/actualbudget/actual-server.git cd actual-server yarn install ``` Results in an error. ```Release/obj/gen/sqlite3/sqlite3.c:13700:10: fatal error: 'stdio.h' file not found``` I looked at line 13700 of sqlite3.c, but the line is not dealing with stdio.h... Error log attached. [yarn install debug log](https://github.com/actualbudget/actual/files/9041806/2022-07-04T19_58_47_164Z-debug-0.log) ```npm update```(in /actual-server) also throws errors about sqlite3. [npm update debug log](https://github.com/actualbudget/actual/files/9041814/2022-07-04T20_00_17_709Z-debug.log) Using an m1max macbook pro.
Author
Owner

@tonyxiao commented on GitHub (Jul 10, 2022):

Getting a similar problem, and this is my log with yarn install. @tillmanjex were you able to fix your issue?

❯ yarn
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > @actual-app/web > @pmmmwh/react-refresh-webpack-plugin@0.4.3" has unmet peer dependency "react-refresh@>=0.8.3 <0.10.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > @actual-app/web > @pmmmwh/react-refresh-webpack-plugin@0.4.3" has incorrect peer dependency "webpack@>=4.43.0 <6.0.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-core > @rschedule/ical-tools@1.2.5" has unmet peer dependency "ical.js@^1.3.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-core > snapshot-diff@0.2.2" has unmet peer dependency "react-test-renderer@>=15".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > react-test-renderer@16.14.0" has incorrect peer dependency "react@^16.14.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > rollup-plugin-babel@4.4.0" has unmet peer dependency "rollup@>=0.60.0 <3".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > rollup-plugin-commonjs@9.3.4" has unmet peer dependency "rollup@>=0.56.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native@0.65.1" has incorrect peer dependency "react@17.0.2".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native-reanimated@2.5.0" has unmet peer dependency "@babel/preset-typescript@*".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native-screens > react-freeze@1.0.0" has incorrect peer dependency "react@^17.0.0".
warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > rn-snoopy > eslint-plugin-jsx-a11y@5.1.1" has unmet peer dependency "eslint@^2.10.2 || ^3 || ^4".
[4/4] 🔨  Building fresh packages...
[-/21] ⠁ waiting...
[2/21] ⠁ better-sqlite3
[10/21] ⠁ lzma-native
[6/21] ⠁ better-sqlite3
error /Users/tony/Code/actualbudget/actual/node_modules/lzma-native: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build && rimraf build
Arguments:
Directory: /Users/tony/Code/actualbudget/actual/node_modules/lzma-native
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@16.15.0 | darwin | arm64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node" (not found)
node-pre-gyp http GET https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz
node-pre-gyp http 404 https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for lzma-native@6.0.1 and node@16.15.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.15.0 | darwin | arm64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.15.0 | darwin | arm64
gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
(node:61068) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
gyp info spawn args [
gyp info spawn args   '/Users/tony/Code/actualbudget/actual/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/tony/Code/actualbudget/actual/node_modules/lzma-native/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/tony/Library/Caches/node-gyp/16.15.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=/Users/tony/Library/Caches/node-gyp/16.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/tony/Code/actualbudget/actual/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/tony/Library/Caches/node-gyp/16.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native',
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 ok
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.15.0 | darwin | arm64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
env: python: No such file or directory
make: *** [Release/nothing.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/tony/.nvm/versions/node/v16.15.0/bin/node" "/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node" "--module_name=lzma_native" "--module_path=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd /Users/tony/Code/actualbudget/actual/node_modules/lzma-native
gyp ERR! node -v v16.15.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/tony/.nvm/versions/node/v16.15.0/bin/node /Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node --module_name=lzma_native --module_path=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/tony/Code/actualbudget/actual/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Darwin 21.4.0
node-pre-gyp ERR! command "/Users/tony/.nvm/versions/node/v16.15.0/bin/node" "/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/tony/Code/actualbudget/actual/node_modules/lzma-native
node-pre-gyp ERR! node -v v16.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/tony/.nvm/versions/node/v16.15.0/bin/node /Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0
<!-- gh-comment-id:1179732349 --> @tonyxiao commented on GitHub (Jul 10, 2022): Getting a similar problem, and this is my log with yarn install. @tillmanjex were you able to fix your issue? ``` ❯ yarn yarn install v1.22.19 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > @actual-app/web > @pmmmwh/react-refresh-webpack-plugin@0.4.3" has unmet peer dependency "react-refresh@>=0.8.3 <0.10.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > @actual-app/web > @pmmmwh/react-refresh-webpack-plugin@0.4.3" has incorrect peer dependency "webpack@>=4.43.0 <6.0.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-core > @rschedule/ical-tools@1.2.5" has unmet peer dependency "ical.js@^1.3.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-core > snapshot-diff@0.2.2" has unmet peer dependency "react-test-renderer@>=15". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > react-test-renderer@16.14.0" has incorrect peer dependency "react@^16.14.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > rollup-plugin-babel@4.4.0" has unmet peer dependency "rollup@>=0.60.0 <3". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > loot-design > rollup-plugin-commonjs@9.3.4" has unmet peer dependency "rollup@>=0.56.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native@0.65.1" has incorrect peer dependency "react@17.0.2". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native-reanimated@2.5.0" has unmet peer dependency "@babel/preset-typescript@*". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > react-native-screens > react-freeze@1.0.0" has incorrect peer dependency "react@^17.0.0". warning "workspace-aggregator-9bf709e0-bcca-4118-b725-877d7ed63707 > mobile > rn-snoopy > eslint-plugin-jsx-a11y@5.1.1" has unmet peer dependency "eslint@^2.10.2 || ^3 || ^4". [4/4] 🔨 Building fresh packages... [-/21] ⠁ waiting... [2/21] ⠁ better-sqlite3 [10/21] ⠁ lzma-native [6/21] ⠁ better-sqlite3 error /Users/tony/Code/actualbudget/actual/node_modules/lzma-native: Command failed. Exit code: 1 Command: node-pre-gyp install --fallback-to-build && rimraf build Arguments: Directory: /Users/tony/Code/actualbudget/actual/node_modules/lzma-native Output: node-pre-gyp info it worked if it ends with ok node-pre-gyp info using node-pre-gyp@0.11.0 node-pre-gyp info using node@16.15.0 | darwin | arm64 node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp info check checked for "/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node" (not found) node-pre-gyp http GET https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz node-pre-gyp http 404 https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz node-pre-gyp WARN Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz node-pre-gyp WARN Pre-built binaries not found for lzma-native@6.0.1 and node@16.15.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp http 404 status code downloading tarball https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v6.0.1-n-api-darwin-arm64.tar.gz gyp info it worked if it ends with ok gyp info using node-gyp@7.1.2 gyp info using node@16.15.0 | darwin | arm64 gyp info ok gyp info it worked if it ends with ok gyp info using node-gyp@7.1.2 gyp info using node@16.15.0 | darwin | arm64 gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9" (node:61068) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. (Use `node --trace-deprecation ...` to show where the warning was created) gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9 gyp info spawn args [ gyp info spawn args '/Users/tony/Code/actualbudget/actual/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/tony/Code/actualbudget/actual/node_modules/lzma-native/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/tony/Library/Caches/node-gyp/16.15.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=/Users/tony/Library/Caches/node-gyp/16.15.0', gyp info spawn args '-Dnode_gyp_dir=/Users/tony/Code/actualbudget/actual/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/tony/Library/Caches/node-gyp/16.15.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native', 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 ok gyp info it worked if it ends with ok gyp info using node-gyp@7.1.2 gyp info using node@16.15.0 | darwin | arm64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a env: python: No such file or directory make: *** [Release/nothing.a] Error 127 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:527:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Darwin 21.4.0 gyp ERR! command "/Users/tony/.nvm/versions/node/v16.15.0/bin/node" "/Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node" "--module_name=lzma_native" "--module_path=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" gyp ERR! cwd /Users/tony/Code/actualbudget/actual/node_modules/lzma-native gyp ERR! node -v v16.15.0 gyp ERR! node-gyp -v v7.1.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/Users/tony/.nvm/versions/node/v16.15.0/bin/node /Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64/lzma_native.node --module_name=lzma_native --module_path=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0.1-n-api-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/tony/Code/actualbudget/actual/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28) node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) node-pre-gyp ERR! System Darwin 21.4.0 node-pre-gyp ERR! command "/Users/tony/.nvm/versions/node/v16.15.0/bin/node" "/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /Users/tony/Code/actualbudget/actual/node_modules/lzma-native node-pre-gyp ERR! node -v v16.15.0 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok Failed to execute '/Users/tony/.nvm/versions/node/v16.15.0/bin/node /Users/tony/Code/actualbudget/actual/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/tony/Code/actualbudget/actual/node_modules/lzma-native/binding-v6.0 ```
Author
Owner

@tjex commented on GitHub (Jul 11, 2022):

nope, yarn install gives me the same error as before.
Strangely though I can simply run yarn start at the root of the actual-server directory and it will work via the browser... Without installing anything extra.
I also got it working via Docker.

What I don't understand though is that even after doing a new test with a fresh clone of actual-server, the transactions that I had input in the previous tests - from a different clone of actual-server - are still there...
I don't understand why... Planning to jump on the discord to ask about it when I have a chance, but if anyone wants to chime in before hand, would be super!

<!-- gh-comment-id:1180608539 --> @tjex commented on GitHub (Jul 11, 2022): nope, `yarn install` gives me the same error as before. Strangely though I can simply run `yarn start` at the root of the actual-server directory and it will work via the browser... Without installing anything extra. I also got it working via Docker. What I don't understand though is that even after doing a new test with a fresh clone of actual-server, the transactions that I had input in the previous tests - from a different clone of actual-server - are still there... I don't understand why... Planning to jump on the discord to ask about it when I have a chance, but if anyone wants to chime in before hand, would be super!
Author
Owner

@tjex commented on GitHub (Jul 20, 2022):

@tonyxiao turns out it was a Rosetta issue. You can either change your terminal arch temporarily to x86_64 or you can set terminal to open with Rosetta. After closing and reopening terminal again, I ran yarn install and it all worked fine.

<!-- gh-comment-id:1190141422 --> @tjex commented on GitHub (Jul 20, 2022): @tonyxiao turns out it was a Rosetta issue. You can either change your terminal arch temporarily to x86_64 or you can set terminal to open with Rosetta. After closing and reopening terminal again, I ran `yarn install` and it all worked fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#49231