Project has an unmet peer dependency: "tslib"
See original GitHub issueDescription/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:
- Created 4 years ago
- Comments:6
Top 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 >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
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.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.