fix(cli): add explicit dependency on color-convert#16757
Conversation
|
Hi @sehoon38, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
Summary of ChangesHello @sehoon38, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a critical Module not found error by adding color-convert as an explicit dependency to @google/gemini-cli. This is a standard and effective solution for issues with transitive dependency resolution, particularly in containerized environments like Docker. The change is minimal, well-targeted, and the accompanying updates to package-lock.json are as expected. I find no issues with this approach. Excellent work on identifying and resolving this dependency issue.
|
Size Change: -2 B (0%) Total Size: 23.1 MB ℹ️ View Unchanged
|
|
Hi, thank you for looking into this. While this is a necessary fix I guess, I don't think this addresses the root cause of my problem (#16745). Two weeks later I may have a similar problem with another dependency. I would really prefer if there was a way to disable automatic updates. In the docker environment I do not see any config files. Setting environment variable did not turn off the updates. |
Summary
This PR adds
color-convertas an explicit dependency to@google/gemini-cli. This resolves a criticalModule not founderror encountered when running the CLI in Docker environments, likely caused by dependency hoisting behavior during the global installation from the packed tarball.Details
Error: Cannot find module 'color-convert'was observed in Docker.color-convertis a transitive dependency viaink-gradient->gradient-string->chalk->ansi-styles, it was not being correctly resolved in the Docker runtime environment.packages/cli/package.jsonensures it is installed as a direct dependency, guaranteeing its availability.Related Issues
Fixes #16745
N/A
How to Validate
npm run build:packagesnpm installandnpm run startshould continue to work on macOS/Linux.Pre-Merge Checklist