-
-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Syncpack version
14.0.0
Operating system(s)
Mac
Steps to reproduce
- Create a PNPM workspace with multiple packages.
- Introduce cyclic dependencies between workspace packages.
Example structure:
packages/
package-a → depends on package-b
package-b → depends on package-c
package-c → depends on package-a
- Install dependencies:
pnpm installTerminal output
Terminal output:
❯ pnpm install
Scope: all XX workspace projects
WARN There are cyclic workspace dependencies:
/packages/package-a
/packages/package-b
/packages/package-c
PNPM reports cyclic workspace dependencies.
- Run syncpack:
pnpm syncpack fixThe process freezes indefinitely.
Expected behavior
syncpack should detect cyclic workspace dependencies and either:
- exit with an error, or
- show a warning and terminate gracefully.
The command should not hang indefinitely.
Actual behavior
syncpack fix never completes when cyclic dependencies exist.
The process appears frozen and must be manually terminated using Ctrl+C.
Removing the cyclic dependency allows syncpack to run normally.
Contents of syncpack configuration file
Optional comments
The issue is especially problematic when syncpack is attached to git hook. Then it's even more difficult to detect what is the problem
Code of Conduct
- I agree to follow the Code of Conduct
{ "versionGroups": [ { "label": "Use workspace protocol when developing local packages", "dependencies": ["$LOCAL"], "dependencyTypes": ["!local"], "pinVersion": "workspace:*" }, { "label": "Allow pnpm override references (e.g., $react)", "dependencyTypes": ["pnpmOverrides"], "dependencies": ["**"], "isIgnored": true } ], "semverGroups": [ { "label": "Use exact versions for all dependencies", "dependencies": ["**"], "range": "" } ] }