-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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] wrong version used when publishing from a workspace #5745
Comments
This issue still exists in |
This issue still exists in |
This issue still exists in |
I think I ran into this problem as well, however in a slightly different manner and before opening a new issue, I will add my finding to this one. It seems that - within a workspace - This showcases the behavior inside of a workspace. Notice the lines:
When I move the package outside of the workspace, I get the expected outcome, where the existing tarball is used: I can force the expected behavior, if I pass @npm/cli-team do you have any comment on this issue? Edit: before anyone asks, I have also tested this with Node v20.8.0 and NPM v10.1.0 and the issue still exists. |
I also confirm that this issue still exists in |
Still an issue in |
Closing this, as newly reported issue #7726 is the similer if not duplicate. Keeping the newer one open for better visibility. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Considering the following project structure and code:
Running
node index.js
from./my-project
will result in:instead of
The issue seems to be related to the
workspaces
attribute from the rootpackage.json
.Because removing this attribute will produce the proper result.
Expected Behavior
I would expect that the
package.json
file used during the commandnpm publish {path}
is the one located in the givenpath
argument and not another one from somewhere else (being cwd or whatsoever).Steps To Reproduce
git clone https://github.com/Badisi/issue-npm-publish-with-workspaces
npm install
npm run start
Environment
The text was updated successfully, but these errors were encountered: