Next.js Discord

Discord Forum

Type resolution failure with Yarn PnP, Typescript, and PyCharm

Unanswered
White-eyed Vireo posted this in #help-forum
Open in Discord
White-eyed VireoOP
I set up a new Next app using create-next-app, with Typescript support. I'm using new Yarn, so I would like to use PnP. However, when doing so, I get a following error in PyCharm (using a different IDE is unfortunately not an option) on Metadata fields: Corresponding file is not included in tsconfig.json. This seems to be an IDE-specific error, as next dev runs correctly. I think it might be related to the IDE not resolving types correctly when using PnP, but as far as I'm aware all Jetbrains IDEs have had PnP support built-in for years now, Is there a way to fix it?

tsconfig.json includes and excludes:
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]

0 Replies