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

fix(init): use locally installed version of given package #7721

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

milaninfy
Copy link
Contributor

npm init calls libnpmexec with path and runPath, for most cases it would not matter but when we have a package installed locally on root and we want to run npm init that-package -w workspace it should identify that-package is installed and use that to init new workspace package. here the path is where node_modules are and runPath is cwd to run the command.
Fixes: #7700

@milaninfy milaninfy marked this pull request as ready for review August 13, 2024 18:05
@milaninfy milaninfy requested a review from a team as a code owner August 13, 2024 18:05
@wraithgar wraithgar merged commit 91e46a3 into npm:latest Aug 13, 2024
22 checks passed
@github-actions github-actions bot mentioned this pull request Aug 13, 2024
@milaninfy milaninfy deleted the mm/fix-init branch August 26, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] npm init does not use locally installed version of given package.
2 participants