openvenues / node-postal

NodeJS bindings to libpostal for fast international address parsing/normalization
MIT License
220 stars 76 forks source link

error installing node-postal #24

Open pravink opened 4 years ago

pravink commented 4 years ago

node -v == v13.1.0 npm -v == 6.12.1

I can successfully use address parser..

error log ==

/home/ec2-user/.cache/node-gyp/13.1.0/include/node/v8.h:3427:37: note: candidate expects 3 arguments, 2 provided make: *** [Release/obj.target/expand/src/expand.o] Error 1 make: Leaving directory/efs/pelias-code/interpolation/node_modules/node-postal/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Linux 4.14.146-120.181.amzn2.x86_64 gyp ERR! command "/home/ec2-user/.nvm/versions/node/v13.1.0/bin/node" "/home/ec2-user/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /efs/pelias-code/interpolation/node_modules/node-postal gyp ERR! node -v v13.1.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok

cymen commented 4 years ago

There is a pending PR to get Node.js v12+ compatibility in. Hopefully, it'll get merged soon. In the meantime, I forked to here with the PR merged:

https://www.npmjs.com/package/@cymen/node-postal

This definitely works with Node.js v12 and should work with v13.

nelsonlarocca commented 4 years ago

@cymen your version works fine even in alpine-13 after gcloud cloud building didn't work cause 2Gb memory are not enough do you know how much memory would be required in order to run ? thanks !

cymen commented 4 years ago

@nelsonlarocca I missed this but the process I have using this is consuming 2 GB of memory. So I would guess you need 2 GB to run it. Is the build failing though? Not sure how much is required to build it. Maybe try 4 GB if you can?