-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update Node.js requirement in create-block docs. #60962
Conversation
Build fails with Node 14 because Object.hasOwn was introduced in Node 16.9.0: ``` [webpack-cli] TypeError: Object.hasOwn is not a function at getBlockJsonScriptFields (.../node_modules/@wordpress/scripts/utils/block-json.js:28:15) at .../node_modules/@wordpress/scripts/utils/config.js:253:9 ```
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @kovshenin! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Hi I believe the npm version also needs to be increased, according to this table? The create-block/package.json file needs updating as well, it still says node version 14 or above:
|
Good point about Lines 17 to 20 in 3d9bdee
It probably reflects actively supported Node.js versions: https://nodejs.org/en/about/previous-releases. Maybe we should also support Node 18 which is in maintenance mode until April 2025. |
Set to 18/10.5 in 415a6ed given that 16 is no longer supported, though I should note that create-block worked fine with 16.9/8.19. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you so much for this patch.
I think we should add a changelog entry with the breaking changes section just for the sake of documentation purposes like in:
https://github.com/WordPress/gutenberg/blob/trunk/packages/create-block/CHANGELOG.md#breaking-change
I don't think @wordpress/create-block
is used as a regular dependency in projects, but technically speaking it is a breaking change.
I think you still need to run |
I'm going to merge this. The Windows job failure is a known issue (a Slack link requires login). |
Couple questions: really not my area of expertise but:
For me, I was already on |
I missed the In fact, for npm packages we should define 20.9.0 as the minimum required Node.js version based on the fact that it was the first LTS version: https://nodejs.org/en/blog/release/v20.9.0. Node |
Thx for double checking @gziolo. |
I created a follow-up PR - #60962. Let's keep Gutneberg and Core versions in sync. |
What?
Updates minimum required Node.js version from 14.0.0 to 16.9.0:
Why?
The build currently fails with:
Object.hasOwn was introduced in Node.js 16.9.0.