voidzero-dev / voidzero-dev/vite-plus

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

Open
#1,610 2 comments 0 reactions 1 assignee Claimed by @semimikoh View on GitHub
bug
Dominant language
Rust
Stars
5.8k
Forks
261
Avg merge
1d 34m
Merged PRs (30d)
135

Description

### 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

```bash
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

```shell
vp 0.1.21, pnpm 11.0.9, macOS arm64.
```

### Used Package Manager

pnpm

### Logs

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

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

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Check that there isn't [already an issue](https://github.com/voidzero-dev/vite-plus/issues) for the same bug.
- [x] Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.