anothersmith / node-duckdb

DuckDB NodeJS bindings
MIT License
48 stars 12 forks source link

yarn add duckdb errors out using node 19 #152

Closed gitChristian closed 1 year ago

gitChristian commented 1 year ago

This work fine for me using node 18. Im on Apple mac Intel chip. Here is the output i get when I yarn add duckdb using node 19

warning Error running install script for optional dependency: "/Users/chris/flipside/product-eng/node_modules/unix-dgram: Command failed.
Exit code: 7
Command: node-gyp rebuild
Arguments:
Directory: /Users/chris/flipside/product-eng/node_modules/unix-dgram
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@19.0.0 | darwin | x64
gyp info find Python using Python version 3.9.13 found at \"/usr/local/opt/python@3.9/bin/python3.9\"
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
gyp ERR! stack     at createConfigFile (/Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:117:21)
gyp ERR! stack     at /Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:84:9
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:189:23)
gyp ERR! System Darwin 20.6.0
gyp ERR! command \"/Users/chris/.nvm/versions/node/v19.0.0/bin/node\" \"/Users/chris/flipside/product-eng/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/chris/flipside/product-eng/node_modules/unix-dgram
gyp ERR! node -v v19.0.0
[14/28] ⠠ @prisma/client
[21/28] ⠠ duckdb
[23/28] ⠠ @temporalio/core-bridge
[9/28] ⠠ sharp
warning Error running install script for optional dependency: "/Users/chris/flipside/product-eng/node_modules/deasync: Command failed.
Exit code: 7
Command: node ./build.js
Arguments:
Directory: /Users/chris/flipside/product-eng/node_modules/deasync
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@19.0.0 | darwin | x64
gyp info find Python using Python version 3.9.13 found at \"/usr/local/opt/python@3.9/bin/python3.9\"
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
gyp ERR! stack     at createConfigFile (/Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:117:21)
gyp ERR! stack     at /Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:84:9
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:189:23)
gyp ERR! System Darwin 20.6.0
gyp ERR! command \"/Users/chris/.nvm/versions/node/v19.0.0/bin/node\" \"/Users/chris/flipside/product-eng/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/chris/flipside/product-eng/node_modules/deasync
gyp ERR! node -v v19.0.0
gyp ERR! node-gyp -v v7.1.2
[14/28] ⠄ @prisma/client
[21/28] ⠄ duckdb
[-/28] ⠄ waiting...
[9/28] ⠄ sharp
error /Users/chris/flipside/product-eng/node_modules/duckdb: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /Users/chris/flipside/product-eng/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@19.0.0 | darwin | x64
node-pre-gyp info check checked for "/Users/chris/flipside/product-eng/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-v111-darwin-x64.tar.gz
node-pre-gyp ERR! install response status 403 Forbidden on https://duckdb-node.s3.amazonaws.com/duckdb-v0.5.1-node-v111-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for duckdb@0.5.1 and node@19.0.0 (node-v111 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-v111-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@19.0.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@19.0.0 | darwin | x64
gyp info find Python using Python version 3.9.13 found at "/usr/local/opt/python@3.9/bin/python3.9"
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
gyp ERR! stack     at createConfigFile (/Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:117:21)
gyp ERR! stack     at /Users/chris/flipside/product-eng/node_modules/node-gyp/lib/configure.js:84:9
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:189:23)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/chris/.nvm/versions/node/v19.0.0/bin/node" "/Users/chris/flipside/product-eng/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/chris/flipside/product-eng/node_modules/duckdb/lib/binding/duckdb.node" "--module_name=duckdb" "--module_path=/Users/chris/flipside/product-eng/node_modules/duckdb/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
gyp ERR! cwd /Users/chris/flipside/product-eng/node_modules/duckdb
gyp ERR! node -v v19.0.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/chris/.nvm/versions/node/v19.0.0/bin/node /Users/chris/flipside/product-eng/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/chris/flipside/product-eng/node_modules/duckdb/lib/binding/duckdb.node --module_name=duckdb --module_path=/Users/chris/flipside/product-eng/node_modules/duckdb/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (7)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/chris/flipside/product-eng/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/Users/chris/.nvm/versions/node/v19.0.0/bin/node" "/Users/chris/flipside/product-eng/node_modules/duckdb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/chris/flipside/product-eng/node_modules/duckdb
node-pre-gyp ERR! node -v v19.0.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.10
node-pre-gyp ERR! not ok

error Command failed.
Exit code: 1
Command: /Users/chris/.nvm/versions/node/v19.0.0/bin/node
Arguments: /usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js add duckdb
Directory: /Users/chris/flipside/product-eng/apps/query-retrieve
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
gitChristian commented 1 year ago

wrong repo