Skip to content

[BUG] NPX does not work outside package directories #1975

Closed
@Nicholaiii

Description

@Nicholaiii

Current Behavior:

When using npx in any directory not initialised with a package.json, npx stops beacause of ENOENT package.json.

Expected Behavior:

npx runs the command regardlessly, like it does in the one shipped with npm@6

Steps To Reproduce:

$ npm i -g npm@7
$ npx jay (anywhere that's not in a package)

Environment:

  • OS: Windows 10 1909
  • Node: 14.7.0
  • npm: 7.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions