Was trying to setup a github repo locally (owid/owid-grapher) but keep running into this clang error issue which leads to node-gyp and node-pre-gyp errors
I call it using npm_config_build_from_source=true yarn install
and then everything works up until the node-pre-gyp shows up with fallback to build. There is a clang error mentioned in the output and seems to be the reason.
Can't figure out why it's showing up.
`
error /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.10
node-pre-gyp info using node@16.13.2 | darwin | arm64
node-pre-gyp info check checked for "/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/binding/duckdb.node" (not found)
node-pre-gyp http GET https://duckdb-node.s3.amazonaws.com/duckdb-v0.5.1-node-v93-darwin-arm64.tar.gz
node-pre-gyp ERR! install response status 403 Forbidden on https://duckdb-node.s3.amazonaws.com/duckdb-v0.5.1-node-v93-darwin-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for duckdb@0.5.1 and node@16.13.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 403 Forbidden on https://duckdb-node.s3.amazonaws.com/duckdb-v0.5.1-node-v93-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.13.2 | 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.13.2 | darwin | arm64
gyp info find Python using Python version 3.9.10 found at "/Users/yaboi/miniforge3/bin/python3"
(node:98425) [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 /Users/yaboi/miniforge3/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/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/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/yaboi/Library/Caches/node-gyp/16.13.2/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/yaboi/Library/Caches/node-gyp/16.13.2',
gyp info spawn args '-Dnode_gyp_dir=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/yaboi/Library/Caches/node-gyp/16.13.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb',
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.13.2 | darwin | arm64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/duckdb/src/duckdb_node.o
clang: error: no such file or directory: 'coder/opensource/owid-grapher/node_modules/duckdb/node_modules/node-addon-api'
make[1]: *** [Release/obj.target/duckdb/src/duckdb_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 22.1.0
gyp ERR! command "/Users/yaboi/.nvm/versions/node/v16.13.2/bin/node" "/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/binding/duckdb.node" "--module_name=duckdb" "--module_path=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb
gyp ERR! node -v v16.13.2
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/yaboi/.nvm/versions/node/v16.13.2/bin/node /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/binding/duckdb.node --module_name=duckdb --module_path=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/binding --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/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Darwin 22.1.0
node-pre-gyp ERR! command "/Users/yaboi/.nvm/versions/node/v16.13.2/bin/node" "/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb
node-pre-gyp ERR! node -v v16.13.2
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
node-pre-gyp ERR! not ok
Failed to execute '/Users/yaboi/.nvm/versions/node/v16.13.2/bin/node /Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/yaboi/Desktop/coder coder/opensource/owid-grapher/node_modules/duckdb/lib/bi
`
Tried reinstalling xcode build tools, node, nvm, etc everything.