xstate-tools icon indicating copy to clipboard operation
xstate-tools copied to clipboard

@xstate/cli has missing peer dependency on prettier

Open andrei-picus-tink opened this issue 2 years ago • 0 comments

@xstate/cli depends on @xstate/tools-shared, which in turn has a peer dependency on prettier. Installing @xstate/cli with yarn@3 prints a peer dependency warning

➤ YN0002: │ @xstate/cli@npm:0.3.3 doesn't provide prettier (p2490c), requested by @xstate/tools-shared

According to https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency:

The author of [@xstate/cli] can fix this problem by adding a peer dependency on [prettier]. If relevant, they can use optional peer dependencies to this effect.

However, I see that the xstate peer dependency from @xstate/tools-shared is directly installed by @xstate/cli, so you could also add prettier there. This one confuses me a bit, wouldn't you want @xstate/cli to depend on the project's xstate version, rather than bundling its own?

andrei-picus-tink avatar Feb 16 '23 13:02 andrei-picus-tink