Skip to content

Conversation

@GulajavaMinistudio
Copy link
Owner

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: npm#7700

`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
@GulajavaMinistudio GulajavaMinistudio merged commit 45717e3 into GulajavaMinistudio:latest Aug 15, 2024
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