[BUG] All workspaces require script during npm run * --workspaces #3043
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 7.x
work is associated with a specific npm 7 release
Current Behavior:
I have a package with three workspaces - 2 packages, and a directory with end-to-end tests depending on them.
Currently, if my packages have a
build
script, I would like to runnpm run build --workspaces
. If mye2e
workspace doesn't have abuild
script, the command fails. My workaround is that I have to add a blank"build": ""
script to enable that, and to do the same for any other command I'd like to run in multiple but not all workspaces.Expected Behavior:
npm run * --workspaces
will run the command in every package that has that script, and will ignore packages without that script.Steps To Reproduce:
Environment:
OS: Mac 10.15.7
npm: 7.8.0
node: v14.15.5
The text was updated successfully, but these errors were encountered: