mapnik / node-mapnik

Bindings to mapnik for node.js
http://mapnik.org/documentation/node-mapnik
BSD 3-Clause "New" or "Revised" License
533 stars 165 forks source link

AWS Lambda with Node 10/12 #937

Open hwernstrom opened 4 years ago

hwernstrom commented 4 years ago

I had this working well with the 3.7.2 version in AWS Lambda using node 8.

AWS is removing the access to node 8 in AWS Lambda next month.

I went to move to node 10 or 12 but need to upgrade to the 4.0.0 version to support node 10.

Mapnik itself loads fine in node 10 for version 4.x. When it registers plugins, on the AWS Lambda environment, that I need I get this error though

Problem loading plugin library: /var/task/node_modules/mapnik/lib/binding/lib/mapnik/input/pgraster.input (dlopen failed - plugin likely has an unsatisfied dependency or incompatible ABI)

The bindings are being pulled from "https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.3.1/node-v64-linux-x64-Release.tar.gz"

Using node 12 with 4.3.2 I get a different error completely.

/var/task/node_modules/mapnik/lib/binding/mapnik.node: undefined symbol: _ZN2v82V813DisposeGlobalEPPNS_8internal6ObjectE

I've have tried to using docker images of lambci/lambda and amazon/lambda-build-node10.x to recreate the issue using npm install and a simple index.js file but mapnik plugins seem to load fine.

I'm not sure what the next step should be with node 8 support being dropped next month.

hwernstrom commented 4 years ago

This appears to be a problem with the node version that nodejs12x and nodejs10x uses.

If I uses a custom execution layer from https://github.com/lambci/node-custom-lambda

It works fine.