Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: cannot convert ‘void (*)(void*)’ to ‘node::Environment*’ Node v16 #35

Closed
RianovRV1 opened this issue Aug 24, 2021 · 4 comments · Fixed by #37
Closed

error: cannot convert ‘void (*)(void*)’ to ‘node::Environment*’ Node v16 #35

RianovRV1 opened this issue Aug 24, 2021 · 4 comments · Fixed by #37

Comments

@RianovRV1
Copy link

I am having issues building the bindings, subject contains the key error.
I am using CentOS version 8.4.2105 with Node v16.0.0 installed via NodeJS provided RPM

Make install of libpostal seemed to pose no issue.

I will attempt using some older version of node, starting with 12 to see if I can get it to build.
The output of performing npm install is attached

npm install output.txt

@RianovRV1
Copy link
Author

RianovRV1 commented Aug 24, 2021

Using NVM I:
Downgraded to Node v12.22.5
Added "export LD_LIBRARY_PATH=/usr/local/lib" to ~/.bashrc (Alternatively run ldconfig /usr/local/lib and run ldconfig -p | grep libpostal to verify the link is established.)
And re ran npm install node-postal to get around the issue.
This also works for Node v14.17.5
After doing so when switching back to Node v16 the app silently fails.

Also some extra searching through stackoverflow claims that the conversion error is due to use C syntax for a C++ compiler. Hope that helps who ever looks at this issue.

@missinglink
Copy link
Contributor

I can confirm it's not working in node 16

@kembuco do you have any tips for handling these API changes?
I had a quick look and couldn't even figure out where to start 🤷‍♂️

@crispycarrot
Copy link

Confirming this issue on v17.0.1

@aloisklink
Copy link

#36 fixes this, at least for me in Node v16.

I used npm install https://github.com/nthparty/node-postal.git#node16 and I can at least run the example in the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants