#tsconfig.json help

1 messages · Page 1 of 1 (latest)

errant schooner
#

I tried npx tsconfig.json and it says The system cannot execute the specified program. because it doesn't know what to use to run it?

icy mirage
#

first of all, what are you even trying to do?

errant schooner
#

good question

icy mirage
#

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

errant schooner
#

I'm trying to get a tsconfig.json file using ben's npm package

icy mirage
#

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?

errant schooner
#

yarn!

icy mirage
#

you wanna add the script globally or just for this project?

#

if it's just for the project

errant schooner
#

globallyy

icy mirage
#

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

errant schooner
#

just by saying 'tsconfig.json' after?

#

it thorws an error

icy mirage
#

which error

errant schooner
#

error Command "tsconfig.json" not found.

icy mirage
#

try with npx

#

if it's installed, npx will find it

icy mirage
errant schooner
errant schooner
#

oh

#

ill set it up rn

icy mirage
#

try installing in the project with

yarn add -D tsconfig.json
errant schooner
#

yeah I already have the path mb

icy mirage
#

you have a different path for each node installation

#

but nvm handles that for u

errant schooner
#

when I put which tsconfig.json in this project's terminal it shows the path that it always is tho

icy mirage
#

now run it with npx

errant schooner
icy mirage
#

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

errant schooner
icy mirage
#
{
  "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"]
}