unsatisfied peer-dependency on typescript in v13.2.0 of `@commitlint/cli`
See original GitHub issueExpected Behavior
running npm ls
with @commitlint/cli
installed should exit zero, meaning that there are no unsatisfied peer dependencies in the dependency tree.
Current Behavior
npm ls
reports an unsatisfied peer dependency on typescript
:
npm ERR! peer dep missing: typescript@>=2.7, required by ts-node@9.1.1
npm ls ts-node
shows that the requirement is pulled in by @endemolshinegroup/cosmiconfig-typescript-loader
:
└─┬ @commitlint/cli@13.2.0
└─┬ @commitlint/load@13.2.0
└─┬ @endemolshinegroup/cosmiconfig-typescript-loader@3.0.2
└── ts-node@9.1.1
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
either make @endemolshinegroup/cosmiconfig-typescript-loader
an optional peer dependency or define typescript as a direct dependency of the cli package in order to satisfy the peer requirement.
Steps to Reproduce (for bugs)
npm install @commitlint/cli -D
npm ls
Context
i use commitlint in many projects that are not typescript projects, so i do not want to define typescript as a direct dependency in those projects to satisfy a peer requirement of commitlint.
Your Environment
Executable | Version |
---|---|
commitlint --version |
13.2.0 |
git --version |
2.27.0 |
node --version |
14.17.5 |
npm --version |
6.14.14 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How do I fix the npm UNMET PEER DEPENDENCY ...
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more ... So my typescript needs to be between 2.4.2 and...
Read more >ts-jest | Yarn - Package Manager
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. NPM version NPM downloads Known...
Read more >commitlint/cli
Lint your commit messages. Latest version: 17.3.0, last published: a month ago. Start using @commitlint/cli in your project by running `npm ...
Read more >Files changed (37) - Renovate Bot Package Diff
node 6 unhappy again. ... peer dependency against Typescript 2.x ... -13,11 +22,9 @@ It supports all features of TypeScript including type-checking.
Read more >commitlint
unsatisfied peer-dependency on typescript in v13.2.0 of `@commitlint/cli`. lingzan. lingzan CLOSED · Updated 1 year ago ... Updated 2 months ago ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
by choosing to include
@endemolshinegroup/cosmiconfig-typescript-loader
as a dependency, i think it becomes your issue, unfortunately. i do believe it would be better for the fix to be applied to their package directly, it looks like that has become stalled, leaving the unsatisfied peer requirement in your dependency tree.the same fix that has been proposed in the PR against
@endemolshinegroup/cosmiconfig-typescript-loader
could be included here to satisfy the requirement at this level. if the problem is resolved directly in@endemolshinegroup/cosmiconfig-typescript-loader
, the more local fix could be reverted at that point.if you are open to that path forward, i would be happy to send a PR.
related: