Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npx add confirmation to proceed everytime #4619

Closed
2 tasks done
slorber opened this issue Mar 25, 2022 · 4 comments · Fixed by #4929
Closed
2 tasks done

[BUG] npx add confirmation to proceed everytime #4619

slorber opened this issue Mar 25, 2022 · 4 comments · Fixed by #4929
Assignees
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 8.x work is associated with a specific npm 8 release

Comments

@slorber
Copy link

slorber commented Mar 25, 2022

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.
@slorber slorber added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Mar 25, 2022
@slorber
Copy link
Author

slorber commented Mar 25, 2022

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)

@fritzy
Copy link
Contributor

fritzy commented Mar 29, 2022

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

@lukekarrys lukekarrys self-assigned this Mar 29, 2022
@fritzy
Copy link
Contributor

fritzy commented Mar 30, 2022

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

@fritzy fritzy added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Mar 30, 2022
ruyadorno added a commit to ruyadorno/cli that referenced this issue Mar 30, 2022
Fixes the proper path location to use when targetting specific
workspaces.

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: npm#3520
Relates to: npm#4619
Relates to: npm/statusboard#403
ruyadorno added a commit to ruyadorno/cli that referenced this issue Mar 30, 2022
Fixes the proper path location to use when targetting specific
workspaces.

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: npm#3520
Relates to: npm#4619
Relates to: npm/statusboard#403
ruyadorno added a commit to ruyadorno/cli that referenced this issue Mar 31, 2022
Fixes the proper path location to use when targetting specific
workspaces.

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: npm#3520
Relates to: npm#4619
Relates to: npm/statusboard#403
ruyadorno added a commit to ruyadorno/cli that referenced this issue Mar 31, 2022
Fixes the proper path location to use when targetting specific
workspaces.

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: npm#3520
Relates to: npm#4619
Relates to: npm/statusboard#403
ruyadorno added a commit to ruyadorno/cli that referenced this issue Apr 19, 2022
Refactor / clean up of the logic around reading installed
packages. Fixes reading packages from mixed sources (one being
from the local installed tree and the other from the registry
using pacote.manifest).

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: npm#3668
Relates to: npm#4643
Relates to: npm#4619
Relates to: npm/statusboard#403
lukekarrys pushed a commit that referenced this issue Apr 19, 2022
Refactor / clean up of the logic around reading installed
packages. Fixes reading packages from mixed sources (one being
from the local installed tree and the other from the registry
using pacote.manifest).

Makes it so that libnpmexec is always reading from the
Arborist actual tree instead of reading `node_modules` from
the file system when retrieving local package data.

Fixes: #3668
Relates to: #4643
Relates to: #4619
Relates to: npm/statusboard#403
@jihunleekr
Copy link
Contributor

jihunleekr commented May 25, 2022

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
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants