question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Peer dependency warnings for @types/node

See original GitHub issue

Depending on @commitlint/prompt or @commitlint/cli results in peer dependency warnings because the @types/node peer dependency of cosmiconfig-typescript-loader is not satisfied in @commitlint/load

Depending on @commitlint/prompt or @commitlint/cli should not result in any peer dependency warnings.

Depending on @commitlint/prompt or @commitlint/cli results in peer dependency warnings.

peer-dependency-warning

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Either expose @types/node as a peer dependency of @commitlint/load and then of @commitlint/cli and @commitlint/prompt, or add @types/node as a dependency of @commitlint/load.

I’d be happy to open a pull request for this, but am curious if there’s a preference as to how we resolve this (see above).

Steps to Reproduce (for bugs)

  1. yarn init
  2. yarn add @commitlint/cli
reproduce

Context

Consolidate all JavaScript tooling into a single package https://github.com/hoverinc/hover-javascript/

Your Environment

Executable Version
commitlint --version 16.1.0
git --version 1.33.0
node --version 16.13.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jrolfscommented, Feb 5, 2022

Maybe also align the versions when you are on it anways. Looks like we have these two different versions atm:

@types/node”: “^12.20.27”, “@types/node”: “12.20.43”,

I guess these could just be the same.

Also, I use manypkg in my monorepos to keep dependencies aligned. I could open another PR to add that here but there a quite a few fixes it would make:

manypkg check
1reaction
escapedcatcommented, Feb 5, 2022

so maybe adding it as a direct dependency of @commitlint/load with a permissive range would be the best solution?

Got it, sounds good to me. Wanna give it a try?

Read more comments on GitHub >

github_iconTop Results From Across the Web

YARN warning "has unmet peer dependency". What do with ...
It simply means that the dependency eslint-plugin-flowtype that you are (indirectly) using (through react-scripts ) requires that you add @babel ...
Read more >
What are peer dependencies in a Node module? - Flavio Copes
A simple explanation of the peerDependencies field in the package.json file. ... npm will give you a warning (and the code will likely...
Read more >
check-peer-dependencies | Yarn - Package Manager
Checks peer dependencies of the current NodeJS package. ... This utility will recursively find all peerDependencies in your project's dependencies list.
Read more >
if you don't want pnpm to fail on peer dependency issues, add ...
eslint - pnpm peer dependencies auto-install - Stack Overflow ... Lucid via pnpm i and the result is a lot of ugly warnings...
Read more >
Nodejs build - out of memory - Render community
May 14 02:29:43 PM warning " > react-dates@21.8.0" has unmet peer dependency ... has unmet peer dependency "@types/node@>= 8.0.0".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found