yarn why – couldn’t find package workspace-aggregator-[UUID]

Do you want to request a feature or report a bug?
I think this is a bug – only applies with the experimental yarn workspaces enabled.

I was attempting to get the new experimental Yarn workspaces working in my mono repo and discovered yarn why isn’t working. Issue #3841 referred to yarn list which is working. I wonder if further updates are required for why (and possibly any other relevant commands).

What is the current behavior?

Running yarn why fails with the error below:

error Couldn't find package "workspace-aggregator-2e092624-1b04-4de1-9847-260953ff91b5" on the "npm" registry.

The v4 UUID is random and will change each time.

If the current behavior is a bug, please provide the steps to reproduce.

The shell steps below will create a contrived simple repo that reproduces the problem.

rm -rf repo
mkdir repo
cd repo
mkdir -p packages/p1
echo '{"name":"repo", "private":true, "workspaces":["packages/*"]}' >package.json
echo '{"name":"p1", "version": "0.0.1"}' >packages/p1/package.json
yarn install
yarn why p1

What is the expected behavior?

Yarn should show information on why package is installed (i.e. it is package present in the workspace). It should not fail with an error.

Please mention your node.js, yarn and operating system version.

Component Version
Node.JS v8.2.1
Yarn v0.28.4
OS Docker container node:8.2.1

Author: Fantashit

1 thought on “yarn why – couldn’t find package workspace-aggregator-[UUID]

Comments are closed.