Skip to content

[BUG] npx add confirmation to proceed everytime #4619

Closed

Description

@slorber

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

➜  docusaurus git:(main) node -v
v16.14.2
➜  docusaurus git:(main) npm -v
8.5.0

➜  docusaurus git:(main) npx yarn-deduplicate
Need to install the following packages:
  yarn-deduplicate
Ok to proceed? (y) y

➜  docusaurus git:(main) npx yarn-deduplicate
Need to install the following packages:
  yarn-deduplicate
Ok to proceed? (y) y

Expected Behavior

The second execution of npx yarn-deduplicate shouldn't ask for a confirmation

Steps To Reproduce

see above

Environment

  • npm: 8.5.0
  • Node.js: 16.14.2
  • OS Name: MacOS 12.1 Monterey
  • System Model Name: ?
  • npm config:
; "user" config from /Users/sebastienlorber/.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; node bin location = /Users/sebastienlorber/.volta/tools/image/node/16.14.2/bin/node
; cwd = /Users/sebastienlorber/Desktop/projects/docusaurus
; HOME = /Users/sebastienlorber
; Run `npm config ls -l` to show all defaults.

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    Release 8.xwork is associated with a specific npm 8 release
    on Mar 25, 2022
  2. slorber commented on Mar 25, 2022

    @slorber
    Author

    Issue asked by @lukekarrys here: #3821 (comment)

    Some additional notes:

    • We have been running postinstall: "npx yarn-deduplicate" for a while and this issue only appeared recently for me
    • I often switch/upgrade Node version with Volta. I was probably on a lower Node v16 version before
    • It doesn't seem to happen for all packages I try to execute with npx (for example npx npkill does not ask me for any confirmation apart the very 1st time)
  3. fritzy commented on Mar 29, 2022

    @fritzy

    I am unable to reproduce on the same versions of Node.js, npm, and OS.

  4. self-assigned this
    on Mar 29, 2022
  5. fritzy commented on Mar 30, 2022

    @fritzy

    Moving this to priority 2, and @lukekarrys is going to look into it further.

  6. added
    Priority 2secondary priority issue
    and removed
    Needs Triageneeds review for next steps
    on Mar 30, 2022
  7. jihunleekr commented on May 25, 2022

    @jihunleekr
    Contributor

    I am unable to reproduce on the same versions of Node.js, npm, and OS.

    When the installed package updates its major version, it is reproduced.

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

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions