#tsconfig.json help
1 messages · Page 1 of 1 (latest)
first of all, what are you even trying to do?
good question
if you want to create a tsconfig.json it's npx tsc --init, if you want to compile the project is npx tsc --project tsconfig.json
I'm trying to get a tsconfig.json file using ben's npm package
oh
it's script on npm you have to execute
i don't remember how you use it, give me a sec
you have to install the package and then execute it
which package manager are you using?
npm, yarn or pnpm?
yarn!
you wanna add the script globally or just for this project?
if it's just for the project
globallyy
ok
yarn global add tsconfig.json
run this and it will install the script
then you can execute it directly from the cli
yarn global add tsconfig.json
tsconfig.json
like this
which error
error Command "tsconfig.json" not found.
you probably didn't setup your path variable
^ is after doing npx tsconfig.json
oh
ill set it up rn
that's weird
try installing in the project with
yarn add -D tsconfig.json
yeah I already have the path mb
the paths change since you are using nvm
you have a different path for each node installation
but nvm handles that for u
when I put which tsconfig.json in this project's terminal it shows the path that it always is tho
done
now run it with npx
same thing wth
wtf
idk what's happening
JS is just weird
are you doing a nodejs project?
if so I can send you the tsconfig
actually I can send you any of them, they are on his repo
yeahh i am
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
"skipLibCheck": true,
"sourceMap": true,
"outDir": "./dist",
"moduleResolution": "node",
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"baseUrl": "."
},
"exclude": ["node_modules"],
"include": ["./src/**/*.ts"]
}