Super User Asked by Michael Prescott on January 1, 2022
I’ve a project setup with yarnv2 and I work within VSCode. TypeScript’s tsc can resolve dependencies; however, VSCode cannot.
I’ve tried yarn dlx @yarnpkg/pnpify --sdk vscode
and yarn unplug uuid
, but neither has had any effect. I believe the problem is that VSCode expects @types/uuid (and other modules) to be expanded and in a ./node_modules directory at the base of the project; however, I would have also guessed that pnpify or unplug would have assisted. So, I’m just speculating. Is it possible to have VSCode work with Yarn V2 projects or is it not ready, yet?
I also found this, https://stackoverflow.com/questions/60778047/yarn-cannot-find-module, but still no luck.
I found this https://stackoverflow.com/questions/54954337/is-it-possible-to-use-yarn-pnp-with-typescript-vscode
The critical step that finally got VSCode configured was setting the workspace version to 3.9.7-pnpify. See bottom right of VSCode:
However, along the way in trying to solve it, I ran the two commands noted above, and yarn add @yarnpkg/pnpify
followed by yarn pnpify --sdk
without specifying vscode. Point being, I'm not sure if @yarnpkg/pnpify MUST be in the workspace or not. So if it fails for you, maybe try all of the above.
Answered by Michael Prescott on January 1, 2022
1 Asked on January 10, 2021 by erik
1 Asked on January 10, 2021 by geoffds
0 Asked on January 10, 2021 by fitzmode
1 Asked on January 9, 2021 by karim-alahmed
0 Asked on January 9, 2021 by anhnha
1 Asked on January 9, 2021
0 Asked on January 8, 2021 by tom-s
1 Asked on January 8, 2021 by erik-wallin
1 Asked on January 8, 2021 by phineas
2 Asked on January 8, 2021 by pineapple
1 Asked on January 7, 2021
0 Asked on January 7, 2021
drag and drop libreoffice libreoffice impress libreoffice writer openoffice
2 Asked on January 7, 2021 by jayunit100
hyper v nested virtualization virtual machine virtualization windows server 2019
1 Asked on January 7, 2021 by fitzroy
3 Asked on January 7, 2021 by palswim
1 Asked on January 7, 2021 by remeika
1 Asked on January 7, 2021 by tylyp
0 Asked on January 6, 2021 by peacedog
Get help from others!
Recent Answers
Recent Questions
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP