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?]: Typescript 4.5.2 cant find type declarations #3802

Closed
1 task
kputnins opened this issue Nov 26, 2021 · 1 comment
Closed
1 task

[Bug?]: Typescript 4.5.2 cant find type declarations #3802

kputnins opened this issue Nov 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@kputnins
Copy link

kputnins commented Nov 26, 2021

Self-service

  • I'd be willing to implement a fix

Describe the bug

I have a project using

  • React
  • Typescript
  • yarn2 3.1.0 with nodeLinker: pnp

Updating TypeScript 4.4.4 => 4.5.2 broke TS typing - TS can't resolve type declarations from packages
image

Even though they are there and were working on TS 4.4.4
image

I double checked that with nodeLinker: node-modules TS has no problems and finds the typings in the node_modules folder, so this feels like somethings wrong with yarns pnp linker

To reproduce

Repo with minimal React app setup and all required dependencies
https://github.com/kputnins/ts-yarn-bug

You can run yarn tsc to run the projects TS with --noEmit to see the problems
image

Environment

System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  Binaries:
    Node: 16.9.1 - ~\AppData\Local\Temp\xfs-bff7c140\node.CMD
    Yarn: 3.1.0 - ~\AppData\Local\Temp\xfs-bff7c140\yarn.CMD
    npm: 7.21.1 - C:\Program Files\nodejs\npm.CMD

Additional context

No response

@kputnins kputnins added the bug Something isn't working label Nov 26, 2021
@merceyz
Copy link
Member

merceyz commented Nov 26, 2021

Duplicate of #3722

@merceyz merceyz marked this as a duplicate of #3722 Nov 26, 2021
@merceyz merceyz closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants