next-template icon indicating copy to clipboard operation
next-template copied to clipboard

VS Code TypeScript settings points to a directory outside the project which might not be present

Open thesobercoder opened this issue 2 years ago • 1 comments

Just observed that the TypeScript library directory mentioned in the .vscode/settings.json points to a directory that might not be present on the users' machine.

 "typescript.tsdk": "../../node_modules/.pnpm/[email protected]/node_modules/typescript/lib",

I think it should be configured like this -

 "typescript.tsdk": "./node_modules/typescript/lib",

Also, based on this discussion, it looks like the tsconfig.tsbuildinfo file should be added to .gitignore.

https://github.com/vercel/next.js/discussions/30815#discussioncomment-1614404

thesobercoder avatar May 27 '23 18:05 thesobercoder

This change fixed the exact same issue I was having.

{
  "typescript.tsdk": "./node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true
}

asfires avatar Jun 10 '23 05:06 asfires