Skip to content

vp run --filter reports a cycle on workspaces with peer- or dev- dep links between siblings #1610

@danielroe

Description

@danielroe

Describe the bug

discovered when playing around in nuxt/nuxt... (I tried to run vp run --filter './packages/**' prepack where nuxt depends on @nuxt/vite-builder and @nuxt/vite-builder has nuxt as a peer dep...)

the issue seems to be that vp run --filter includes devDependencies and peerDependencies in its dep graph...

(I think pnpm and turbo only follow dependencies for build order.)

Reproduction

https://github.com/danielroe/vp-cycle-repro

Steps to reproduce

pnpm install
pnpm --filter './packages/**' build   # succeeds in topological order
vp run --filter './packages/**' build # → error: Cycle dependency detected: app#build -> builder#build -> app#build

pnpm install warns about the cyclic workspace links but still completes; the build itself runs fine.

System Info

vp 0.1.21, pnpm 11.0.9, macOS arm64.

Used Package Manager

pnpm

Logs

❯ vp run --filter './packages/**' build
VITE+ - The Unified Toolchain for the Web

error: Cycle dependency detected: app#build -> builder#build -> app#build

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Target date

    None yet

    Start date

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions