Skip to content

[BUG] npx appears broken in 7+ with PATH #2627

@dl748

Description

@dl748

test.zip

Current Behavior:

Version 6+

export PATH=$(pwd)/node_modules/.bin:$PATH
$ webpack --version
4.44.2
$ npx webpack --version
4.44.2
$ cd common
$ webpack --version
4.44.2
$ npx webpack --version
4.44.2

Version 7+

export PATH=$(pwd)/node_modules/.bin:$PATH
$ webpack --version
4.44.2
$ npx webpack --version
4.44.2
$ cd common
$ webpack --version
4.44.2
$ npx webpack --version
Need to install the following packages:
  webpack
Ok to proceed? (y)

Expected Behavior:

Should not ask to install as it already exists in the PATH

Environment:

OS: Linux 5.7.9
Node: v14.15.4
npm: 7.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasecmd:execrelated to `npx`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions