Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect peer setup (revealed with pnpm, npm8) #100

Open
NullVoxPopuli opened this issue Jan 17, 2023 · 3 comments
Open

Incorrect peer setup (revealed with pnpm, npm8) #100

NullVoxPopuli opened this issue Jan 17, 2023 · 3 comments

Comments

@NullVoxPopuli
Copy link
Collaborator

NullVoxPopuli commented Jan 17, 2023

in an addon,

.
├─┬ @glint/environment-ember-loose 0.9.7
│ ├── ✕ missing peer @glimmer/component@^1.1.2
│ ├── ✕ missing peer ember-cli-htmlbars@^6.0.1
│ └─┬ @glint/template 0.9.7
│   └── ✕ missing peer @glimmer/component@^1.1.2
├─┬ ember-template-lint 4.18.2
│ └─┬ ember-template-imports 3.4.0
│   └── ✕ missing peer ember-cli-htmlbars@^6.0.0
└─┬ @types/ember__test-helpers 2.9.1
  └─┬ @ember/test-helpers 2.9.3
    ├── ✕ missing peer ember-source@>=3.8.0
    └─┬ @embroider/util 1.9.0
      └── ✕ missing peer ember-source@"*"
Peer dependencies that should be installed:
  @glimmer/component@">=1.1.2 <2.0.0"
  ember-cli-htmlbars@">=6.0.1 <7.0.0"
  ember-source@>=3.8.0

So we need to add the 3 recommended dependencies to the peer list, because we ship glint by default"

ember-cli-htmlbars is a bit silly though, so I'm going to add a pnpm.ignore entry for that (idk how to do the equiv for npm)

@SergeAstapov
Copy link
Contributor

@NullVoxPopuli Seem related to #77 where Ed provided some feedback on each of these

@NullVoxPopuli
Copy link
Collaborator Author

yeah, I think we can add ember-source and @glimmer/component right away.

@NullVoxPopuli
Copy link
Collaborator Author

on a non-typecript project, I get these errors:

 WARN  Issues with peer dependencies found
peer-test
├─┬ ember-source 4.10.0
│ └─┬ ember-auto-import 2.5.0
│   ├─┬ babel-loader 8.3.0
│   │ └── ✕ missing peer webpack@>=2
│   ├─┬ css-loader 5.2.7
│   │ └── ✕ missing peer webpack@"^4.27.0 || ^5.0.0"
│   ├─┬ mini-css-extract-plugin 2.7.2
│   │ └── ✕ missing peer webpack@^5.0.0
│   └─┬ style-loader 2.0.0
│     └── ✕ missing peer webpack@"^4.0.0 || ^5.0.0"
└─┬ ember-template-lint 4.18.2
  └─┬ ember-template-imports 3.4.0
    └── ✕ missing peer ember-cli-htmlbars@^6.0.0
Peer dependencies that should be installed:
  ember-cli-htmlbars@^6.0.0  webpack@">=5.0.0 <6.0.0"

test-app
├─┬ @ember/test-helpers 2.9.3
│ └─┬ ember-destroyable-polyfill 2.0.3
│   └─┬ ember-compatibility-helpers 1.2.6
│     └─┬ babel-plugin-debug-macros 0.2.0
│       └── ✕ missing peer @babel/core@^7.0.0-beta.42
├─┬ @glimmer/component 1.1.2
│ └─┬ ember-cli-typescript 3.0.0
│   └─┬ @babel/plugin-transform-typescript 7.5.5
│     ├── ✕ missing peer @babel/core@^7.0.0-0
│     ├─┬ @babel/helper-create-class-features-plugin 7.20.12
│     │ └── ✕ missing peer @babel/core@^7.0.0
│     └─┬ @babel/plugin-syntax-typescript 7.20.0
│       └── ✕ missing peer @babel/core@^7.0.0-0
├─┬ ember-load-initializers 2.1.2
│ └─┬ ember-cli-typescript 2.0.2
│   ├─┬ @babel/plugin-proposal-class-properties 7.18.6
│   │ └── ✕ missing peer @babel/core@^7.0.0-0
│   └─┬ @babel/plugin-transform-typescript 7.4.5
│     └── ✕ missing peer @babel/core@^7.0.0-0
├─┬ ember-resolver 8.1.0
│ └─┬ babel-plugin-debug-macros 0.3.4
│   └── ✕ missing peer @babel/core@^7.0.0
└─┬ ember-source 4.10.0
  └─┬ @babel/plugin-transform-block-scoping 7.20.11
    └── ✕ missing peer @babel/core@^7.0.0-0
Peer dependencies that should be installed:
  @babel/core@">=7.0.0 <8.0.0"

Done in 21.3s

the @babel/core issue we know about, and is blocked by an ember-cli-babel v8 release: emberjs/ember-cli-babel#453

I don't believe ember-template-imports should require ember-cli-htmlbars,
reported here: ember-cli/ember-template-imports#114

webpack shouldn't be required either, but ember-auto-import is notifying of that issue, so the only path forward there is for v2 addons to not depend on anything that depends on ember-auto-import, which in this instance is ember-source, which means that ember-source needs to be converted to a v2 addon.

for the time being, for js projects, I think we need to use pnpm ignores for these dependencies -- they aren't yet needed, but the peer declarations are valid for app-consumers of these things.
(however, @babel/core isn't used until ember-cli-babel@8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants