Skip to content

Install fails with Node v23, due to -std=c++17. #238

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

Open
magnusriga opened this issue Mar 1, 2025 · 2 comments · May be fixed by #240
Open

Install fails with Node v23, due to -std=c++17. #238

magnusriga opened this issue Mar 1, 2025 · 2 comments · May be fixed by #240

Comments

@magnusriga
Copy link

Would it be possible to update binding.gyp, from -std=c++17 to -std=c++20 (or higher)?

A minimum of C++20 is required in Node 23:

https://github.com/nodejs/node/blob/9d2368f64329bf194c4e82b349e76fdad879d32a/deps/v8/include/v8config.h#L13

Without it, building tree-sitter will fail.

@gpetrov
Copy link
Contributor

gpetrov commented Mar 4, 2025

this should be easily solved in changing in binding.gyp all c++17 to c++20 @amaanq

@MaximusSeniorem MaximusSeniorem linked a pull request Mar 6, 2025 that will close this issue
@segevfiner
Copy link
Contributor

But note that upgrading the C++ std version can prevent usage with older OS/compilers and versions of Node.js... This is something/another thing Node.js/v8 doesn't handle that well IMHO...

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.

3 participants