Skip to content

Issue: failure to run with combinedDependencies: true on a monorepo #947

@asfaltboy

Description

@asfaltboy

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 error

ERROR: Extracting dependencies ran afoul of...

pWorkspace.endsWith is not a function
... in e2e/playwright.config.ts

Without 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)

  1. Create a yarn workspaces project
  2. Add number of packages in different locations
  3. Run depcruise --init wizard, choose the defaults
  4. Set the option combinedDependencies: true
  5. Run 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

  • Version used: 16.3.6
  • Node version: 20.9
  • Operating System and version: macOS Sonoma 14.5 (23F79)
  • Link to your project: private

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething is not working as expected

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions