Skip to content

Missing @babel/cli, @babel/core, @babel/runtime, next dependencies #46

@rtritto

Description

@rtritto

Summary

After I install next-plugin-preact with yarn (berry version), I get dependency not found warnings in yarn log.

Respectively peerDeependencies:

  • next and webpack are of @prefresh/next
  • react and react-dom are of next
  • @prefresh/babel-plugin and webpack are of @prefresh/webpack

They should be added in package.json

Versions

  • next-plugin-preact: 3.0.6

Steps Reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn add preact preact-render-to-string preact-ssr-prepass next-plugin-preact
  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
➤ 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 from the remote registry
➤ YN0013: │ preact-render-to-string@npm:5.1.19 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ preact-ssr-prepass@npm:1.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ preact@npm:10.5.14 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ pretty-format@npm:3.8.0 can't be found in the cache and will be fetched from the remote registry
➤ 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:
  "@prefresh/next@*":
    dependencies:
      next: "*"
      react: "*"
      react-dom: "*"
      webpack: "*"
  "@prefresh/webpack@*":
    dependencies:
      "@prefresh/babel-plugin": "*"
      webpack: "*"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions