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

No longer compatible with Node < 16 since upgrade to foreground-child > 3.x #520

Open
webketje opened this issue Feb 10, 2024 · 4 comments

Comments

@webketje
Copy link

All technical details of the test can be found at https://github.com/metalsmith/metalsmith/actions/runs/7854693798/job/21435716699

Since v3.x the dependency foreground-child uses the node: prefix to include constants and due to this c8 throws in Node < 16:

Error: Cannot find module 'node:constants'

Shall preferably be tackled after a solution is chosen at tapjs/foreground-child#56

@bcoe
Copy link
Owner

bcoe commented Feb 19, 2024

@webketje would you be able to contribute a failing test? our test matrix includes Node 14 and 16 and I haven't been seeing failures.

@webketje
Copy link
Author

webketje commented Feb 20, 2024

I think the test I ran has all the details, but it was run with 14.14.0. According to this article: https://2ality.com/2021/12/node-protocol-imports.html#support-for-node%3A-imports, the node: prefixed imports are only supported since 14.18.0, I will re-run a test locally. If that's the case, the engines.node property should only be changed to >=14.18.0

@webketje
Copy link
Author

webketje commented Feb 20, 2024

@bcoe I've done a 2 local test runs with 14.14.0 and 14.18.0 and can confirm that c8 works with Node >=14.18.0 but not with `<14.18.0.

@bcoe
Copy link
Owner

bcoe commented Feb 21, 2024

If that's the case, the engines.node property should only be changed to >=14.18.0

@webketje 👍 sounds like a good call to me.

msimerson added a commit to msimerson/c8 that referenced this issue Apr 18, 2024
msimerson added a commit to msimerson/c8 that referenced this issue Apr 18, 2024
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.

2 participants