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

@wordpress/eslint-plugin package does not support node.js 18 #45696

Closed
james58899 opened this issue Nov 10, 2022 · 7 comments · Fixed by #47490
Closed

@wordpress/eslint-plugin package does not support node.js 18 #45696

james58899 opened this issue Nov 10, 2022 · 7 comments · Fixed by #47490
Assignees
Labels
Needs Dev Ready for, and needs developer efforts [Priority] High Used to indicate top priority items that need quick attention [Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended

Comments

@james58899
Copy link

Description

Node.js 18 is LTS now.
But @wordpress/eslint-plugin dependency eslint-plugin-jsdoc version is too old.

Error:

error [email protected]: The engine "node" is incompatible with this module. Expected version "^12 || ^14 || ^16 || ^17". Got "18.12.1"

Command yarn why eslint-plugin-jsdoc output:

=> Found "[email protected]"
info Reasons this module exists
   - "@wordpress#scripts#@wordpress#eslint-plugin" depends on it
   - Hoisted from "@wordpress#scripts#@wordpress#eslint-plugin#eslint-plugin-jsdoc"

Step-by-step reproduction instructions

  1. Install Node.js 18
  2. yarn add @wordpress/scripts

Screenshots, screen recording, code snippet

No response

Environment info

Node version: 18.12.1
@wordpress/scripts version: 24.5.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@gziolo gziolo added [Priority] High Used to indicate top priority items that need quick attention Needs Dev Ready for, and needs developer efforts [Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended labels Nov 10, 2022
@fabiankaegy
Copy link
Member

There is a PR for this currently: #42656 Based on the latest feedback on that PR the approach that was used is not the right one for the project. But I spoke with @Antonio-Laguna and he was interested in creating a new PR based on the feedback that was shared in #42656 (comment)

@fabiankaegy fabiankaegy changed the title @wordpress/eslint-plugin not support node.js 18 @wordpress/eslint-plugin package does not support node.js 18 Nov 10, 2022
@Antonio-Laguna
Copy link

@fabiankaegy I will create this ASAP :)

@ehrig
Copy link

ehrig commented Nov 26, 2022

@Antonio-Laguna Do you have any news/estimate when the PR will be merged?

Maybe updating the package installation note until this fix is available can be useful for others who try to use node.js 18: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/#installation

@Antonio-Laguna
Copy link

@ehrig it was promptly created on #45697 yet there are issues with NPM that I'm unsure on how to fix.

@nicholasio
Copy link

nicholasio commented Jan 12, 2023

Any updates on this?

Node.js 16 is going EOL later this year.

https://nodejs.org/ar/blog/announcements/nodejs16-eol/

@gziolo
Copy link
Member

gziolo commented Jan 30, 2023

Thank you for the fix @fabiankaegy 👏🏻

@gziolo
Copy link
Member

gziolo commented Jan 30, 2023

As far as I can tell, this change should get published to npm on Wednesday. Let's hope it's the only issue that prevents the package from using with Node 18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Ready for, and needs developer efforts [Priority] High Used to indicate top priority items that need quick attention [Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended
Projects
None yet
7 participants