Cursor with Yarn PNP

I get these errors:

  1. Cannot find module x or its corresponding type declarations.
  2. Property ‘children’ is missing in type x but required in type x

I am using Yarn PNP in a big Typescript/React app.

Cursor can’t find any of the package.json installs.

I am using:

Version: 0.50.5 (user setup)
VSCode Version: 1.96.2
Commit: 96e5b01ca25f8fbd4c4c10bc69b15f6228c80770
Date: 2025-05-18T04:26:31.444Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

I also have VS Code installed and none of the above problems are here.

My Code version:

Version: 1.100.2 (user setup)
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

Please help me fix this problem.

Found the problem.

Turns out that the problem was the Typescript version.
Solved the problem using command:

Ctrl+Shift+P → Typescript: Select Typescript Version…

and choosing the correct typescript version