Skip to content

.npmrc node-options not applied when filtering #9180

@richard-jfc

Description

@richard-jfc

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.5.1

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/richard-jfc/pnpm-bug-repro

Reproduction steps

  1. Checkout the example repo.
  2. Run pnpm --filter sub-pkg test
  3. See that the NODE_OPTIONS is undefined
    NODE_OPTIONS: undefined
    
  4. cd packages/test
  5. Run pnpm test
  6. See that NODE_OPTIONS is defined
    NODE_OPTIONS: --experimental-strip-types
    

Describe the Bug

When running a pnpm script from within a workspace folder pnpm correctly picks up the node-options from the .npmrc. However, when running from the root with a filter then pnpm does not pick up the node-options from the .npmrc

Expected Behavior

pnpm should always include the NODE_OPTIONS from the .npmrc file (regardless of the presence of the --filter option)

Which Node.js version are you using?

22.13.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

KDE neon

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy