components icon indicating copy to clipboard operation
components copied to clipboard

Nuxt build fails when using yarn berry plug-n-play mode

Open LunaTK opened this issue 4 years ago • 0 comments

Describe the bug

  • Nuxt >= v2.15.0 build fails with Yarn v3 PnP because of unmet peerDependency of @nuxt/components
    • @nuxt/components has peerDependency of consola, but nuxt itself does not has consola as a dependency
  • This unmet peerDependency is treated differently depending on the package manager.
    • Yarn v1 treats it as a warning yarn_v1
    • Yarn v3 PnP mode treats it as an error yarn_v3

Is there any reason for specifying consola as a peerDependency? If not necessary, I guess it would better be removed.

To Reproduce

  • Build [email protected] with yarn v3.1 (set nodeLinker: pnp in .yarnrc.yml)
  • Please refer to a reproduction repo (https://github.com/LunaTK/nuxt-components-peerdep-bug).

Expected behavior

  • Nuxt build should succeed no matter which package manager is used

Screenshots provided above

Additional context none

LunaTK avatar Nov 06 '21 05:11 LunaTK