Skip to content

global npx installation is shadowed by nodejs on Windows #21001

Description

@saschanaz
  • Version: 10.2.1
  • Platform: Windows 10 64-bit
  • Subsystem:
> npx --version
npx: installed 1 in 11.516s
The "path" argument must be of type string. Received type undefined
9.7.1
> npm i -g npx
+ npx@10.2.0
updated 1 package in 70.955s
> npx --version
npx: installed 1 in 9.741s
The "path" argument must be of type string. Received type undefined
9.7.1

See also zkat/npx#144 (comment).

Activity

  1. added
    npmIssues and PRs related to the npm client dependency or the npm registry.
    wrong repoIssues that should be opened in another repository.
    on May 28, 2018
  2. bnoordhuis commented on May 28, 2018

    @bnoordhuis
    Member

    Wrong repo. npx is a dependency of npm and is installed per directions of npm, see #14235. If you want to see it changed, open an issue over at npm/npm.

  3. saschanaz commented on May 28, 2018

    @saschanaz
    Author

    @bnoordhuis, I opened this because the Node.js installer for Windows adds special alias for npx and that conflicts with npm because of path order.

    gcm npx points to nodejs where it should point to npm:

    > gcm npx
    
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Application     npx.cmd                                            0.0.0.0    C:\Program Files\nodejs\npx.cmd
    
  4. bnoordhuis commented on May 29, 2018

    @bnoordhuis
    Member

    The changes to the installer were made by an npm employee - by the author of npx, in fact. If something needs to change, discuss it with npm and they'll update the installer next time they upgrade npm in node.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    npmIssues and PRs related to the npm client dependency or the npm registry.wrong repoIssues that should be opened in another repository.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions