preactjs / next-plugin-preact

Next.js plugin for preact X
396 stars 9 forks source link

Missing peerDependency `preact-ssr-prepass` to install commands or in peerDependency replace `react-ssr-prepass` with `preact-ssr-prepass` #47

Open rtritto opened 3 years ago

rtritto commented 3 years ago

Summary

After I install next-plugin-preact with yarn (berry version) as README, in yarn log I get dependency not found warnings (project doesn't provide preact-ssr-prepass requested by next-plugin-preact).

Solutions

In peerDependency of package.json replace react-ssr-prepass with preact-ssr-prepass OR Add to README preact-ssr-prepass to npm and yarn install commands. (It should be wrong because preact-ssr-prepass is already installed as react-ssr-prepass)

Versions

Steps Reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn add next-plugin-preact preact preact-render-to-string react@npm:@preact/compat@* react-dom@npm:@preact/compat@* react-ssr-prepass@npm:preact-ssr-prepass@*
  4. See yarn log

Results

Actual

yarn log:

➤ YN0000: ┌ Resolution step
➤ YN0002: │ next-plugin-preact@npm:3.0.6 [99790] doesn't provide @prefresh/babel-plugin (p48563), requested by @prefresh/webpack
➤ YN0002: │ next-plugin-preact@npm:3.0.6 [99790] doesn't provide next (p7b6b4), requested by @prefresh/next
➤ YN0002: │ next-plugin-preact@npm:3.0.6 [99790] doesn't provide webpack (p67555), requested by @prefresh/next
➤ YN0002: │ next-plugin-preact@npm:3.0.6 [99790] doesn't provide webpack (p99d5e), requested by @prefresh/webpack
➤ YN0002: │ yarnpreact@workspace:. doesn't provide preact-ssr-prepass (p28444), requested by next-plugin-preact
➤ 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
➤ YN0013: │ next-plugin-preact@npm:3.0.6 can't be found in the cache and will be fetched fro
➤ YN0013: │ preact-render-to-string@npm:5.1.19 can't be found in the cache and will be fetch
➤ YN0013: │ preact-ssr-prepass@npm:1.2.0 can't be found in the cache and will be fetched fro
➤ YN0013: │ preact@npm:10.5.14 can't be found in the cache and will be fetched from the remo
➤ YN0013: │ pretty-format@npm:3.8.0 can't be found in the cache and will be fetched from the
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0007: │ next-plugin-preact@npm:3.0.6 [99790] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed
➤ YN0000: Done with warnings

Expect

No warning in yarn log.

Workaround

Add in .yarnrc.yml:

packageExtensions:
  next-plugin-preact@*:
    dependencies:
      preact-ssr-prepass: "*"
...