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

Peer dependencies problem with ts-node with yarn v2 #1890

Closed
myndelx opened this issue Mar 17, 2021 · 3 comments · Fixed by #1891
Closed

Peer dependencies problem with ts-node with yarn v2 #1890

myndelx opened this issue Mar 17, 2021 · 3 comments · Fixed by #1891
Labels
bug Something isn't working released This issue/pull request has been released.

Comments

@myndelx
Copy link
Contributor

myndelx commented Mar 17, 2021

Describe the bug

When installing the last version (10.20.4) of auto, some problems with peer dependencies appear:

$ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @auto-it/core@npm:10.20.4 doesn't provide typescript (pdd9be), requested by ts-node
➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [f111c] doesn't provide typescript (p2b965), requested by ts-node
➤ 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 in 0s 285ms

To Reproduce

With yarn v2:

$ yarn add -D auto

Expected behavior

We shouldn't have warnings about peer dependencies requirements not met.

Environment information:

Environment Information:

"auto" version: v10.20.4
"git"  version: v2.25.1
"node" version: v10.21.0
GHE version:    v2.22.3

Additional context

This issue appears since the v10.20.0 release with yarn v2.

From what I see, the ts-node package has a peer dependency of typescript and ts-node is a direct dependency of the @auto-it/corepackage but it does not provide typescript, so the peer dependency couldn't be met.

As a solution, maybe the @auto-it/core package should use the peerDependenciesMeta field?

"peerDependenciesMeta": {
  "typescript": {
    "optional": true
  }
}

We also got the exact same issue with the @endemolshinegroup/cosmiconfig-typescript-loader package but an issue has already been created: EndemolShineGroup/cosmiconfig-typescript-loader#147

@myndelx myndelx added the bug Something isn't working label Mar 17, 2021
@hipstersmoothie
Copy link
Collaborator

Is that all I have to do? If you submit a PR to fix the issue I'll merge it ASAP

@myndelx myndelx mentioned this issue Mar 18, 2021
6 tasks
@myndelx
Copy link
Contributor Author

myndelx commented Mar 18, 2021

Yes, it should be enough to fix the warning as typescript is required by ts-node, but it's optional for using auto.

@adierkens
Copy link
Collaborator

🚀 Issue was released in v10.20.5 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants