Stan's blog

Cannot find module 'prettier' from, аttempted to determine module path from, yarn and VS Code problem

26 ноября 2024

TLDR: 

yarn dlx @yarnpkg/sdks vscode
VSCode couldn't resolve prettier inside of node_modules since that folder doesn't exist when PnP is enabled. The fix was super easy, as described in Yarn's documentation on Editor SDKs.

From Yarn Docs: Editor SDKs

"Smart IDEs (such as VSCode or IntelliJ) require special configuration for TypeScript to work when using Plug'n'Play installs."

This script installed and configured a bunch of files in my .yarn directory, and immediately solved my issues. Check out the links above to read more.