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

fix: fixed error: ‘class v8::Object’ has no member named ‘CreationCon… #44

Merged
merged 17 commits into from
Jan 22, 2024

Conversation

zack09holland
Copy link
Contributor

…text’; allowing node-gyp to rebind with node-postal, which enables node-postal to be used on Node v20.5.0

…text’; allowing node-gyp to rebind with node-postal, which enables node-postal to be used on Node v20.5.0
@tomups tomups mentioned this pull request Sep 20, 2023
@tomups
Copy link

tomups commented Dec 16, 2023

@zack09holland any chance to add CI tests for this? I think it's the only thing preventing it from merging as mentioned in #43

@zack09holland
Copy link
Contributor Author

zack09holland commented Dec 17, 2023 via email

@tomups
Copy link

tomups commented Jan 20, 2024

@missinglink I think the only necessary changes would be adding Node 18 and 20 in the github actions matrix?

https://github.com/openvenues/node-postal/blob/master/.github/workflows/push.yml#L12-L15

Or is there anything else you think should be tested?

It would be great to have this out as this is the only dependency preventing us from upgrading to Node 20 in our stack.

@missinglink
Copy link
Contributor

adding Node 18 and 20 in the github actions matrix

Yeah exactly, could you please make that change

@tomups
Copy link

tomups commented Jan 20, 2024

adding Node 18 and 20 in the github actions matrix

Yeah exactly, could you please make that change

@zack09holland could you make that change in the PR? I don't want to open a PR myself based on yours just for that change and take the credit 😃

@zack09holland
Copy link
Contributor Author

zack09holland commented Jan 20, 2024 via email

@zack09holland
Copy link
Contributor Author

@tomtastico @missinglink Pushed the requested changes! Let me know if there is anything else.

@missinglink
Copy link
Contributor

missinglink commented Jan 21, 2024

Unfortunately the tests aren't running on GitHub and I'm in New Zealand without a laptop.

Sorry to be a pain but could you please update the GitHub workflow so it triggers on pull requests too, I believe the correct syntax is:

on: [ push, pull_request ]

ref: https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/triggering-a-workflow#using-multiple-events

If you can't get it running I'll sort it out once I'm back in Berlin next week.

@zack09holland
Copy link
Contributor Author

Nice catch. Looks to be running now with my latest push.

@zack09holland
Copy link
Contributor Author

zack09holland commented Jan 21, 2024

@tomtastico @missinglink Alright I may need a second set of eyes to figure out how to get all the tests to pass...

I did have it working where tests for node 16, 18, and 20 passed. Tried to do some further testing to get v12 and v14 to work but it kept failing. So I decided to revert back but when even reverting the changes back to what had passed, everything continued to fail...

Another thing to note, even with this new/change fix in place, node v12 and v14 I believe will continue to fail. Would seem that this version of node-postal and the fork created by @cymen (https://github.com/cymen/node-postal) are quite different. His version seems to work for node v12 and v14 where as this one version I had difficulties getting it to work?

@missinglink
Copy link
Contributor

Not sure what's going on, I opened a PR to trigger the CI against the latest master branch and it passed #48

I can't really do much more from my phone but I'll have another look next week.

@albarrentine
Copy link
Contributor

albarrentine commented Jan 22, 2024

Maybe try upgrading Nan? That handles many of the changes in the C++ APIs across versions. From searching around it seems the issue with CreationContext in Node 20 is resolved with 2.17.0 (https://www.npmjs.com/package/nan/v/2.17.0). We're currently on 2.14.0

@zack09holland
Copy link
Contributor Author

zack09holland commented Jan 22, 2024

@albarrentine @missinglink @tomtastico Fresh set of eyes really does wonders. Was able to get all tests to pass finally!

@missinglink missinglink merged commit a7bf136 into openvenues:master Jan 22, 2024
7 checks passed
@missinglink
Copy link
Contributor

Amazing, thanks so much 🎉

@missinglink
Copy link
Contributor

Seems that publishing a new version to npm requires credentials, unfortunately I won't be able to do that until next week.

Until then the master branch can be used for testing as so: npm install https://github.com/openvenues/node-postal

@missinglink
Copy link
Contributor

missinglink commented Jan 28, 2024

Version 1.2.0 is now published on npm.

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 this pull request may close these issues.

4 participants