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

[BUG] Unmet peer dependencies on TypeScript for Yarn 3 project #2134

Closed
laurenceedge opened this issue Aug 17, 2023 · 4 comments
Closed

[BUG] Unmet peer dependencies on TypeScript for Yarn 3 project #2134

laurenceedge opened this issue Aug 17, 2023 · 4 comments

Comments

@laurenceedge
Copy link

Description/Screenshot
When updating from version 2.8.11 to 3.0.2 I started getting a bunch of unmet peer dependency warnings on typescript in my Yarn 3 project, despite having a version of typescript installed in the project.

➤ YN0002: │ @microsoft/applicationinsights-analytics-js@npm:3.0.2 [8ba97] doesn't provide typescript (p6e66d), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-channel-js@npm:3.0.2 [8ba97] doesn't provide typescript (pe5158), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-channel-js@npm:3.0.2 [8ba97] doesn't provide typescript (p54d0b), requested by @nevware21/ts-async
➤ YN0002: │ @microsoft/applicationinsights-common@npm:3.0.2 [e4d33] doesn't provide typescript (pec1b7), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-core-js@npm:3.0.2 [e4d33] doesn't provide typescript (pdce1d), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-core-js@npm:3.0.2 [e4d33] doesn't provide typescript (p7020d), requested by @nevware21/ts-async
➤ YN0002: │ @microsoft/applicationinsights-dependencies-js@npm:3.0.2 [8ba97] doesn't provide typescript (pb2415), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-dependencies-js@npm:3.0.2 [8ba97] doesn't provide typescript (p4f390), requested by @nevware21/ts-async
➤ YN0002: │ @microsoft/applicationinsights-properties-js@npm:3.0.2 [8ba97] doesn't provide typescript (p382bb), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-shims@npm:3.0.1 doesn't provide typescript (p1d516), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-web@npm:3.0.2 [7f630] doesn't provide typescript (p8e53e), requested by @nevware21/ts-utils
➤ YN0002: │ @microsoft/applicationinsights-web@npm:3.0.2 [7f630] doesn't provide typescript (p21b6a), requested by @nevware21/ts-async
➤ YN0002: │ @microsoft/dynamicproto-js@npm:2.0.2 doesn't provide typescript (pc245f), requested by @nevware21/ts-utils

I believe that npm and earlier versions of yarn are more forgiving with peer dependencies based on this issue yarnpkg/yarn#5347.

Steps to Reproduce

  1. Install yarn if not already installed, see https://yarnpkg.com/getting-started/install.
  2. Initialise a yarn project using yarn init -2, and install typescript@5.1.6 as a dev dependency and @microsoft/applicationinsights-web@3.0.2 as a regular dependency.
  3. Observe the unmet peer requirement warnings.
  • OS/Browser: Windows 10
  • SDK Version [e.g. 22]: 3.0.2
  • How you initialized the SDK: n/a

Expected behavior
Installing @microsoft/applicationinsights-web using yarn 3 does not generate peer dependency warnings.

@MSNev
Copy link
Collaborator

MSNev commented Aug 17, 2023

typescript is a dev dependency only it is not a peer dependency, we don't need it to execute only to compile / generate the SDK code. This seems like an issue with yarn and not our dependencies.

Additionally, we have not tested upgrading to TS 5.x, our dev dependency is currently 4.9.5.

@MSNev
Copy link
Collaborator

MSNev commented Aug 17, 2023

I've raised this issue on ts-utils nevware21/ts-utils#204
And this one for ts-async nevware21/ts-async#79

And now, also submitted PR's to remove the peer dependencies, so one advantage of using the range for these dependencies is once they are fixed this issue ( should ) go away - I'll push to make this happen sooner rather than later.

@laurenceedge
Copy link
Author

Thanks for the quick turnaround. I can confirm that all the warnings have gone after re-installing my @microsoft/applicationinsights-web and @microsoft/applicationinsights-react-js packages. Just a note to anyone else that I had to remove both of these packages before re-adding in order to pick up the newer versions of the updated dependencies.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants