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] npm init doesn't infer the git repo automatically #7940

Closed
2 tasks done
devinjohw opened this issue Nov 26, 2024 · 0 comments · Fixed by npm/init-package-json#315
Closed
2 tasks done

[BUG] npm init doesn't infer the git repo automatically #7940

devinjohw opened this issue Nov 26, 2024 · 0 comments · Fixed by npm/init-package-json#315
Labels
Bug thing that needs fixing Priority 2 secondary priority issue

Comments

@devinjohw
Copy link

devinjohw commented Nov 26, 2024

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

Here I use npm 8 to init my git repo, it infer the git repo automatically, like this:
image
But with npm 9 and above, it doesn't work.
With npm 9, like this:
image
With npm 10, like this:
image

Expected Behavior

Is this behavior expected? If so, why removing this feature? I think this feature is really convenient.

Steps To Reproduce

  1. Init a git repo that link to a remote git repo.
  2. Run npm init.

Environment

  • npm: 8.19.4, 9.9.3, 10.9.1
  • Node.js: 20.17.0
  • OS Name: macOS 14.6.1
  • System Model Name: Macbook Air
  • npm config:
; copy and paste output from `npm config ls` here
; node bin location = /usr/local/bin/node
; node version = v20.17.0
; npm local prefix = /Users/devin/Code/is-string-devin
; npm version = 10.9.1
; cwd = /Users/devin/Code/is-string-devin
; HOME = /Users/devin
; Run `npm config ls -l` to show all defaults.
@devinjohw devinjohw added Bug thing that needs fixing Needs Triage needs review for next steps labels Nov 26, 2024
@devinjohw devinjohw changed the title [BUG] <title> npm init doesn't infer the git repo automatically sn [BUG] npm init doesn't infer the git repo automatically sn Nov 26, 2024
@milaninfy milaninfy added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Nov 28, 2024
@devinjohw devinjohw changed the title [BUG] npm init doesn't infer the git repo automatically sn [BUG] npm init doesn't infer the git repo automatically Dec 3, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants