gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Warn users if they are on node < 20

Open jacob314 opened this issue 1 year ago • 9 comments

What would you like to be added?

Node 18 is out of security support and I would rather we didnt have to spend too much time making our app work with it unless a larger number of our users than I am guessing are still on it. https://endoflife.date/nodejs

We should display a warning on the startup screen when they are using node < 20.

Why is this needed?

Worrying about node < 20 results in us spending time on items like https://github.com/google-gemini/gemini-cli/issues/2474

If we should support node 18 please comment on this bug.

Additional context

No response

jacob314 avatar Jul 02 '25 03:07 jacob314

CC @devpool007 who is interested in implementing this

jacob314 avatar Jul 02 '25 03:07 jacob314

@jacob314 I would be glad to contribute to this and raise PR for it.

kumar-mithlesh avatar Jul 02 '25 04:07 kumar-mithlesh

CC @devpool007 who is interested in implementing this

Thanks for the CC I can take over the implementation.

Hi @kumar-mithlesh I am working on this issue already.

devpool007 avatar Jul 02 '25 07:07 devpool007

Curious, what was the motivation for Node 18 support in the first place?

swissspidy avatar Jul 02 '25 08:07 swissspidy

@swissspidy @NTaylorMullen @jacob314 should we update the README to mention Node 20+ since 18 is EOL?

jackwotherspoon avatar Jul 04 '25 15:07 jackwotherspoon

Personally I'm all favor of bumping the minimum requirement to 20+. That includes the readme and package.json etc.

swissspidy avatar Jul 04 '25 16:07 swissspidy

Hi everyone so @jacob314 reviewed in my PR #2974 "please also update the .md files that reference reference node version 18 to indicate that 20 version 20+ is recommended."

I also personally thought just changing 18 to 20 should be fine. So if everyone agrees I can easily make this change. Also if you have a moment to review my changes would be cool :)

devpool007 avatar Jul 04 '25 16:07 devpool007

Yes, several of our core dependences (https://www.npmjs.com/package/@google/genai) are also node 20+. We should update this in the package.json's engine as well as any readme documentation.

mattKorwel avatar Jul 04 '25 22:07 mattKorwel

Effort Analysis: The a2a-server Express application in packages/a2a-server/src/http/app.ts incorrectly mounts express.json() after calling appBuilder.setupRoutes(expressApp, ''). In Express, middleware is executed in the order it is registered. Consequently, the JSON-RPC routes registered by the A2AExpressApp SDK (specifically POST /) do not have their bodies parsed when requests arrive, as the express.json() middleware hasn't been reached yet. This results in req.body being undefined for those endpoints. The fix is a localized, one-line change to reorder the middleware registration in app.ts, which fits the effort/small criteria for trivial logic adjustments and localized bug fixes.

gemini-cli[bot] avatar Sep 13 '26 11:09 gemini-cli[bot]