Skip to content

pnpm add -g not support user's environment path on windows #5283

Description

@ltbyun

pnpm version: 7.9.5

Code to reproduce the issue:

  1. corepack enable
  2. corepack prepare pnpm@7.9.5 --activate
  3. corepack setup, it set PNPM_HOME to user's env, and add %PNPM_HOME% to PATH of the user's env.
  4. open a new cmd, execute: pnpm add -g @nestjs/cli, error occurs as below:
     ERROR  The configured global bin directory "C:\Users\ilala\AppData\Local\pnpm" is not in PATH
  5. add %PNPM_HOME% to PATH of the system env, reexecute: pnpm add -g @nestjs/cli, everything is fine.

Expected behavior:

no error occurs in step4.
corepack setup add PNPM_HOME and PATH to the user's env, pnpm should first check system env, then check user's env, then merge the two to use.

Actual behavior:

user's path is not supported

Additional information:

  • node -v prints: v16.17.0
  • Windows, macOS, or Linux?: Windows 10 LTSC 2021 x64 21H2 19044.1889

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions