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.

Project has an unmet peer dependency: "tslib"

See original GitHub issue

Description/Screenshot

There is a warning about a missing peerDependency. This is not expected to happen because my project doesn’t even use TS.

Steps to Reproduce

Run yarn add @microsoft/applicationinsights-web in a JS project and you will receive the following warning:

warning " > @microsoft/applicationinsights-web@2.3.1" has unmet peer dependency "tslib@^1.9.3".

Expected behavior

You should be able to install the lib without warnings. In my opinion, tslib shouldn’t be a peer dependency.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
rafaelalmeidatkcommented, Nov 14, 2019

Thanks for the explanation. In this case, it is indeed best suited as a dependency (like Formik does, for example, https://github.com/jaredpalmer/formik/blob/master/package.json#L53)

If you add a dependency as a peerDepedency it is expected that the consumer have it in their own package.json, which is not necessary in this case.

0reactions
github-actions[bot]commented, Aug 16, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix the npm UNMET PEER DEPENDENCY warning?
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more ... Please update NPM in that case as it might...
Read more >
yarn install peer dependencies automatically - You.com
Directly taken from the doc: yarn install is used to install all dependencies for a project. This is most commonly used when you...
Read more >
tslib direct dependency migration - Angular
If you have any libraries within your workspace, this migration will convert tslib peer dependencies to direct dependencies for the libraries.
Read more >
you must install peer dependencies yourself Code Example
npm WARN codelyzer@6.0.1 requires a peer of tslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
Read more >
error message trying to deploy peertube using ansible - GitLab
nwarning \" > file-loader@6.0.0\" has unmet peer dependency \"webpack@^4.0.0 ... has incorrect peer dependency \"tslib@^1.10.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