duckdb-nodejs-layer icon indicating copy to clipboard operation
duckdb-nodejs-layer copied to clipboard

node 20

Open meyerovb opened this issue 2 years ago • 5 comments

thx for this, was gonna use it to write parquet to s3 from a lambda i'm calling from a redshift udf :) then read it back in via spectrum... get around the stupid max return length issue. noticed it doesnt have node 20 in it yet

meyerovb avatar Mar 12 '24 01:03 meyerovb

Have tried this with node 20 and node 18, get the error " "Error: /var/package.jsondoes not exist", " at Object.dn.find (/tmp/tmpvgosqr6x/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js:19:11)". Are you seeing the same?

weisisheng avatar May 11 '24 13:05 weisisheng

How exactly are you bundling/deploying? You don’t need to have the DuckDB Package bundled if you’re using the layer. The error message IMO can’t come from the layer because node-pre-gyp isn’t even used.

See https://github.com/tobilg/serverless-duckdb for an example how to deploy it with the Serverless Framework.

tobilg avatar May 11 '24 14:05 tobilg

I’m just making a lambda function and editing the code in the console. I’m not doing any “deployment” to lambda. It’s just a blank lambda function with a few lines of code, I want to add the layer to it but have to use an old version of node or else I can’t add the layer in the console.

meyerovb avatar May 11 '24 14:05 meyerovb

The Layer itself is only necessary for Node versions below 20, that’s why it‘s only configured for those: https://github.com/tobilg/duckdb-nodejs-layer/blob/62a07937740d93ecde4c807572754982dca16707/publish_layer.sh#L10

With Node 20 you should be able to use the Standard npm package.

tobilg avatar May 11 '24 15:05 tobilg

Thanks for the insights, will give it another try.

weisisheng avatar May 17 '24 05:05 weisisheng