How to configure VSCode to find yarn v2 installed modules

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.

enter image description here

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,, but still no luck.

One Answer

I found this

The critical step that finally got VSCode configured was setting the workspace version to 3.9.7-pnpify. See bottom right of VSCode: enter image description here

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

Add your own answers!

Related Questions

Trim video into multiple sections ffmpeg

0  Asked on January 10, 2021 by fitzmode


How do i install real linux on a chromebook?

1  Asked on January 9, 2021 by karim-alahmed


Teams meeting invitation and Thunderbird

1  Asked on January 8, 2021 by erik-wallin


DOS Copy command to multiple folders

3  Asked on January 8, 2021 by user3711329


Dell Inspiron 5558, Window 8.1 pro

1  Asked on January 7, 2021 by pan


Windows preventing running of Telnet client

3  Asked on January 7, 2021 by palswim


Win 10 won’t load from SSD without old HDD

1  Asked on January 7, 2021 by tylyp


Speaker sound is too low on max volume

0  Asked on January 6, 2021 by peacedog


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP