Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

anu-sin-theta
Copy link

Fix(deps):

resolve ink peer dependency conflict
The ink lib (v6.3.1) requires react-devtools-core version ^6.1.2, but version 4.28.5 was being installed, causing a

TypeError: devtools.initialize is not a function

when running the start script in development mode.

 react-devtools-core, resolving the unmet peer dependency and allowing the development server to start correctly.

TLDR

When running the development server with pnpm run start after a fresh install using pnpm, the script crashes with the
error TypeError: devtools.initialize is not a function.

Dive Deeper

This change addresses a runtime TypeError that occurs when starting the CLI in development mode via pnpm run start. The root cause is a classic peer dependency conflict within the ink UI rendering library and its dependencies.

The Conflict: The version of ink in use (6.3.1) specifies a peer dependency requirement for react-devtools-coreof ^6.1.2. However, due to the dependency resolution across the monorepo, a much older version (4.28.5) was being Installed.
The Trigger: This conflict only manifests in development mode (NODE_ENV=development) because ink attempts to
initialize its devtools, which in turn calls devtools.initialize(). This function does not exist on the older 4.x version
of the react-devtools-core package, leading to the crash. Production builds are unaffected as they do not initialize the devtools.

Reviewer Test Plan

To validate this fix, the reviewer can follow these steps to reproduce the bug and confirm the solution.

  1. Reproduce the Crash (on the main branch):
    Ensure you are on a clean main branch without this change.
    Delete existing node_modules and pnpm-lock.yaml for a clean slate:
    rm -rf node_modules pnpm-lock.yaml
    Install dependencies:
    pnpm install
    Attempt to run the development server:
    pnpm run start
    Observe the failure: The command should crash with the error TypeError: devtools.initialize is not a function.

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

 Fix(deps): 

resolve ink peer dependency conflict
  The ink lib (v6.3.1) requires react-devtools-core version ^6.1.2, but version 4.28.5 was being installed, causing a 

TypeError: devtools.initialize is not a function 

when running the start script in development mode.
 
     react-devtools-core, resolving the unmet peer dependency and allowing the development server to start correctly.
@anu-sin-theta anu-sin-theta requested a review from a team as a code owner October 13, 2025 16:04
Copy link
Contributor

Summary of Changes

Hello @anu-sin-theta, 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 resolves a critical "TypeError" that prevented the development server from starting correctly. The issue stemmed from a peer dependency conflict where the "ink" UI rendering library required a newer version of "react-devtools-core" than what was being installed. By updating the "react-devtools-core" package to the compatible version, the development environment can now initialize properly, allowing developers to run the "start" script without encountering the "devtools.initialize" error.

Highlights

  • Dependency Resolution: Updated the "react-devtools-core" dependency from "^4.28.5" to "^6.1.2" in "package.json" to resolve a peer dependency conflict with the "ink" library.
  • Bug Fix: Fixed a "TypeError: devtools.initialize is not a function" that occurred when running the development server, which was caused by the "ink" library attempting to use an incompatible version of "react-devtools-core".
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly identifies and fixes a peer dependency conflict that was causing crashes in the development environment. The change to update react-devtools-core is the right solution. However, for better long-term maintainability and consistency with existing patterns in this repository, I've suggested using the overrides field in package.json instead of adding a direct development dependency. This makes the intent of forcing a transitive dependency version clearer.

package.json Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.