google-gemini / google-gemini/gemini-cli
Add Node version check
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
While trying to use Gemini CLI for the first time, I encountered an error after running it
```bash
>gemini
file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:206913
webidl.is.File = webidl.util.MakeTypeAssertion(File);
^
ReferenceError: File is not defined
at node_modules/undici/lib/web/webidl/index.js (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:206913:52)
at __require2 (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-34MYV7JD.js:18:50)
at node_modules/undici/lib/web/fetch/util.js (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:207185:22)
at __require2 (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-34MYV7JD.js:18:50)
at node_modules/undici/lib/web/fetch/headers.js (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:220081:9)
at __require2 (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-34MYV7JD.js:18:50)
at node_modules/undici/lib/web/fetch/response.js (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:220536:102)
at __require2 (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-34MYV7JD.js:18:50)
at node_modules/undici/lib/web/fetch/index.js (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-SBG6CUNK.js:221860:9)
at __require2 (file:///home/homigrotas/.nvm/versions/node/v18.20.4/lib/node_modules/@google/gemini-cli/bundle/chunk-34MYV7JD.js:18:50)
Node.js v18.20.4
```
### What did you expect to happen?
Assuming you support a specific range of Node versions, a suitable approach would to check the running Node is supported, and prevent users getting an exception, saving them time to research the exception.
### Client information
irrelevant
### Login information
_No response_
### Anything else we need to know?
_No response_
Contributor guide
Research direction
Reproduce the failure by running the `gemini` command with Node.js v18.20.4, then trace the CLI startup path involved before the reported `undici` stack. Confirm the supported Node range from the project configuration or documentation, and verify that unsupported versions stop with a clear message instead of the `File is not defined` exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100