Open asfaltboy opened 2 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
IRL I've seen this happen when dependency-cruiser is run not in the root of the monorepo but instead in one of its sub folders (workaround then typically: run from the root).
Labeled as bug because dependency-cruiser either (1) needs to behave or (2) explain what's going on.
Looking at the error message again it seems that the yarn workspaces in use in the project at hand has an unexpected non-string entry in the workspaces array (for yarn 2 and up workspaces
is always supposed to be an array of strings, same with npm workspaces f.t.m.). I've adapted the code to deal with that (see #955).
The generic issue mentioned in my previous comment still exists, but seems unrelated to the current issue.
The fix mentioned above has shipped with dependency-cruiser@16.4.1 (release notes: v16.4.1)
Expected Behavior
I'm using yarn workspaces, and I expect it to work out of the box
Current Behavior
whenever I turn on the
combinedDependencies: true
option, I get an errorWithout the option it runs ok, but reports packages as missing, where they are specified at the top level workspace package.json file
Possible Solution
I would love to see a more descriptive error, and ideally it would just work...
Steps to Reproduce (for bugs)
depcruise --init
wizard, choose the defaultscombinedDependencies: true
depcruise .
Context
Just trying dependency-cruiser out, as an alternative to circular dependency lint rule of eslint-plugin-import (see rule definition of
import/no-cycle
)I would also accept a workaround that disables the missing dependency check, if circular deps can be checked independently.
Your Environment