solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[@vinxi/vite-plugin-inspect] Missing `rollup` peer dependency

Open rtritto opened this issue 3 years ago • 0 comments

solid-start use @vinxi/vite-plugin-inspect dependency; @vinxi/vite-plugin-inspect use @vinxi/rollup-plugin-visualizer dependency; @vinxi/rollup-plugin-visualizer use rollup peer dependency. rollup is a transitive peer dependencies and it should be added in package.json of @vinxi/vite-plugin-inspect.

Step to reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn add @solidjs/meta @solidjs/router solid-js solid-start vite

Actual

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @vinxi/vite-plugin-inspect@npm:0.6.27 [cdb4e] doesn't provide rollup (p3be19), requested by @vinxi/rollup-plugin-visualizer
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings

Expected

No warning in log

Workaround

  • Add in .yarnrc.yml:
packageExtensions:
  '@vinxi/vite-plugin-inspect@*':
    peerDependencies:
      'rollup': '*'
  • Run yarn

Changes to fix

Replace @vinxi/vite-plugin-inspect with vite-plugin-inspect

OR

Add in package.json of @vinxi/vite-plugin-inspect:

{
  "dependencies": {
    "rollup": "^2.0.0"  // equal to peer dependency of @vinxi/rollup-plugin-visualizer
  }
}

rtritto avatar Dec 03 '22 16:12 rtritto