berry: [Bug?]: Not finding modules in Typescript import statements
Self-service
- I’d be willing to implement a fix
Describe the bug
Yarn VSCode SDK no longer working to find modules
To reproduce
- Create new folder
yarn set version berryyarn init- Create new file
index.ts yarn add typescript -D- write in
index.tsimport React from 'react' yarn add reactyarn dlx @yarnpkg/sdks vscode- Set Typescript version in VSCode to 4.4.2-sdk
Environment
System: OS: Windows 10 10.0.19043 CPU: (4) x64 Intel® Core™ i5-7600 CPU @ 3.50GHz Binaries: Node: 14.17.4 - C:\Users\user\AppData\Local\Temp\xfs-f520d191\node.CMD Yarn: 3.0.1 - C:\Users\user\AppData\Local\Temp\xfs-f520d191\yarn.CMD npm: 7.11.1 - C:\Program Files\nodejs\npm.CMD
Additional context
Yarn v3.0.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 16 (7 by maintainers)
I missed the version number, sorry about that. TypeScript 4.4 doesn’t have the PnP patch yet, will be fixed by https://github.com/yarnpkg/berry/pull/3297, you can either run
to get the update now or downgrade to TypeScript 4.3
EDIT: Released in
3.0.2so the command is nowThe fix has been released as
3.0.2so you can now the following to fix itBeen stuck on this for a while. Luckily I searched the issues and removed the “is:open” filter 😃
The SDK is unrelated here so
yarn up typescript@~4.3would change all your directtypescriptdependencies to~4.3@merceyz Unfortunately that does not solve the issue. Ran
yarn add -D @types/react. No difference.This is not a React specific issue. All modules are not found unless they are relative paths.