npm ci does not respect workspace flag provided using -w or --workspace

93 Views Asked by At

installing a project with multiple workspaces (workspace-x, workspace-y, workspace-z) using npm ci -w workspace-x command results in below error

`npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

The dependent module versions in the package-lock.json and package.json for workspace-y and workspace-z but not for workspace-x. Hence it's expected to run npm ci for the workspace-x

Although this is not working as expected with -w or --workspace flags, it works when removed workspace-y and workspace-z from the package-lock.json workspaces field.

Any workarounds or suggestions to run npm ci only for workspace-x, where other workspaces are not eligible for npm ci?

0

There are 0 best solutions below