I'm trying to setup a new project where I want to use typescript (and eslint, prettier and jest but that's less important). I'm following this tutorial: https://www.youtube.com/watch?v=-sswKgneCVI
However in the tsconfig.json file I get an error. The way I have set up the project:
yarn init
yarn add typescript
yarn add ts-node @types/node @tsconfig/node20 --dev
touch tsconfig.json
I've got the following tsconfig.json:
{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
It fails to resolve @tsconfig/node20/tsconfig.json and VS code show the following message when I hover over it: File '@tsconfig/node20/tsconfig.json' not found.
I am on a Mac, using Yarn 4.5.1 and node v20.18.0 (used nvm to install it).
I can't find anything on the internet, but could this be caused yarn using zero-installs?
Installed everything according to above shell scripts and didn't expect an error.