Skip to content

[BUG] Unable to update a shared workspace in a monorepo. #8367

Closed
@Nicole-gym

Description

@Nicole-gym

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

I want to know what is the official way to update workspaces version in a monorepo with npm.

I am working in a monorepo, which has product workspace A and shared workspace B.(which A is dependent on B) I am able to update the product workspace A with npm version patch, and it will update the package-lock as well. But when I try the same to my shared workspaces, it shows the npm error code E404 error, and won't update the package-lock.

the monorepo looks like:
my-monorepo/
├── package.json
├── package-lock.json
└── packages/
├── a/
│ └── package.json
├── shared/b/
│ └── package.json
└── c/
└── package.json

Expected Behavior

I want to bump the version for both my product workspace and shared workspace, for the shared workspace, I want to bump up itself version, and also update it in the product workspace. In the end, I want also show the changes in package-lock.

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions