Skip to content

[BUG] npx node@12 executes node@16 #4204

Description

@Kreijstal

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Documentation says you can specify node version with npx, but right now, when using npx node@12 it executes latest version instead

Expected Behavior

Execute latest version

Steps To Reproduce

run npx node@12 with node 16, install it, and then see the version.

Environment

  • npm: 7.24.0
  • Node: v16.10.0
  • OS: Windows 10
  • platform: Acer
  • npm config:
; "builtin" config from C:\Users\k\scoop\apps\nodejs\16.10.0\node_modules\npm\npmrc

cache = "C:\\Users\\k\\scoop\\persist\\nodejs\\cache"
prefix = "C:\\Users\\k\\scoop\\persist\\nodejs\\bin"

; node bin location = C:\Users\k\scoop\apps\nodejs\current\node.exe
; cwd = C:\Users\k\ok\node-ffi-test
; HOME = C:\Users\k
; Run `npm config ls -l` to show all defaults.

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

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 releasecmd:execrelated to `npx`platform:windowsis Windows-specific

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions