Skip to content

fix: add engine-strict = false to npmrc#5771

Merged
ginna-baker merged 3 commits intomainfrom
fix/add-engine-strict-false
Feb 18, 2026
Merged

fix: add engine-strict = false to npmrc#5771
ginna-baker merged 3 commits intomainfrom
fix/add-engine-strict-false

Conversation

@ginna-baker
Copy link
Collaborator

Prevent errors when running pnpm i. Example error:

 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your Node version is incompatible with "@typescript-eslint/typescript-estree@7.13.1(typescript@5.5.2)".

Expected version: ^18.18.0 || >=20.0.0
Got: v18.15.0

This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ginna-baker, 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 an issue where pnpm install commands would fail due to strict Node.js version compatibility checks. By introducing engine-strict = false into the .npmrc configuration, the project can now be set up successfully across various Node.js environments, enhancing developer experience and build reliability.

Highlights

  • Dependency Management: Added engine-strict = false to the .npmrc file to prevent ERR_PNPM_UNSUPPORTED_ENGINE errors during pnpm install.
Changelog
  • .npmrc
    • Added engine-strict = false to allow pnpm install to proceed without Node.js version errors.
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 aims to fix a dependency installation error by adding engine-strict = false to the .npmrc file. While this change successfully resolves the immediate issue, it does so by globally disabling engine compatibility checks, which is a potential risk. I've provided a review comment suggesting a more targeted and safer alternative using pnpm.packageExtensions to override the engine requirement for only the specific problematic dependency. This alternative approach would solve the problem without compromising the project's overall dependency integrity.

link-workspace-packages = deep
hoist = true
shamefully-hoist = true
engine-strict = false
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Disabling engine-strict globally is a risky workaround as it suppresses important compatibility checks for all dependencies, potentially leading to subtle runtime errors.

A safer, more targeted solution is to use pnpm.packageExtensions in package.json to override the engine requirement for the specific problematic package (@typescript-eslint/typescript-estree). This resolves the immediate issue without sacrificing the safety of engine checks for other dependencies.

I recommend removing this change and instead adding a packageExtensions field to the pnpm object in package.json:

// in package.json
"pnpm": {
  "onlyBuiltDependencies": [ ... ],
  "overrides": { ... },
  "packageExtensions": {
    "@typescript-eslint/typescript-estree@^7.13.1": {
      "engines": {
        "node": ">=18.15.0"
      }
    }
  }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like this idea, but it doesn't work. I suspect pnpm enforces engine checks before reading this packageExtensions object

Copy link

@muratkaratekeli muratkaratekeli left a comment

Choose a reason for hiding this comment

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

Approved.

@ginna-baker ginna-baker merged commit b0c4a3d into main Feb 18, 2026
7 checks passed
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.

3 participants

Comments