tsconfig Questions

1

Solved

We currently are in march 2023 and I am looking for a way to make my class decorators work the right way, with no warning from the cli. Here my simple code : function MyDecorator(myConstructor: new...
Messina asked 9/3, 2023 at 11:7

2

My project structure is like this: ---- apps ---- libs -------- index.ts -------- commmon -------- service ------------ index.ts ------------ src ---------------- index.ts ---------------- goods --...
Dole asked 23/3, 2023 at 8:33

4

I saw some questions about this problem, none of them does not work I have a nodejs project along with Typescript. I do not like to use a relative path.I get the following error, when I set path in...
Hamachi asked 4/9, 2020 at 16:31

6

I'm trying to map paths in tsconfig.json to get rid of relative paths hell. My React App is based on Create-React-App. I tried this SO thread and added paths in my tsconfig.json. My tsconfig.json i...
Ideal asked 2/10, 2020 at 14:5

1

Solved

When running tsc how do we exclude the src folder (Root containing folder) from output? I have the outDir set to target and instead of target/src/file.ts I would like target/file.ts?
Summit asked 12/7, 2018 at 22:34

1

I want to use a custom tsconfig named "tsconfig.custom.json" in VS Code, but it seems that it only recognizes tsconfig files named "tsconfig.json". Is there a way to change that...
Earthlight asked 29/3, 2018 at 11:59

1

I am using Vite svelete-ts template. I changed the project structure to bundle every page in one single file without chunks. Everything works except typescript imports for .svelte extensions. I don...
Athanor asked 2/11, 2021 at 9:36

2

I am relying on this extensively on my workflow, but for some reasons this feature is now warning me of all the problems coming from node_modules, which obviously I'm not interested in. How can I ...

3

How can i set/configure a resolution path for the whole "node_modules" directory (not separate modules) for Typescript compiler if that directory is not located in the default resolution path?
Nonconformance asked 21/1, 2019 at 13:32

4

On the Gitlab-CI environment 2 of our Jest tests fail with Cannot find module. The strange thing is that it works on my local Win10 machine - even when I run the tests in a similar docker-container...
Monumental asked 30/11, 2019 at 13:22

2

Solved

What is the use case for noEmit in Typescript? I'm interested because I want to see if I can use this for development where I'll compile and run the compiled code without outputting them onto the f...
Starter asked 5/3, 2019 at 11:47

5

I am trying to update an Angular project (in version 8) to version 9. when running the ng update it gives an error saying Migration failed: Could not find any tsconfig file. Cannot migrate dynamic ...
Lucylud asked 29/6, 2021 at 10:39

2

Intro I was very confused with that rule when I recently ported the Ng code base to Nx 12.x. I hope this post helps others who begin migrating from Ng to Nx. The code base above is a rather small s...
Tarnish asked 21/5, 2021 at 20:36

4

We have a code base that is built every night. Last night, it failed to build (without me making changes that were related to NPM libraries). I got the following error: ERROR TS2688: Cannot find ty...
Fushih asked 20/10, 2022 at 14:29

0

Hi I am stuck with a TypeScript problem. I have the following directory structure: package.json: the top project node_modules/: all installed libraries tsconfig.json build/: a generated folder in...
Hedges asked 30/11, 2022 at 11:15

1

I have a simple typing error detected with cli flag --strict $ ./node_modules/.bin/tsc --strict main.ts main.ts:6:5 - error TS2322: Type 'null' is not assignable to type 'Person'. 6 return n...
Disorient asked 27/11, 2022 at 10:51

2

In this issue a recommendation is made to define this setting field: "typescript.preferences.importModuleSpecifier": "relative" In order to switch VSCode's auto-import behavior...
Disaccord asked 10/1, 2022 at 2:31

7

I created a project with vue-cli3 and included TypeScript My src/app.vue: <template> <div id="app"> <hello-world msg="test"/> </div> </template> <script lang=...
Lasalle asked 18/10, 2018 at 18:5

0

I used Vite to scaffold a typescript-react project, and i wanted to use the given tsconfig.json file to create shortcuts for my directories, so i wont have to deal with long relative paths when imp...
Lyingin asked 14/10, 2022 at 17:33

1

Solved

My project's configuration is a bit complex, so I think it's more appropriate if I shared the commit state link. But, in short, somehow, in the utils.test.ts file, starting today, almost anything I...
Selfdeceit asked 12/10, 2022 at 1:57

2

I have monorepo (yarn workpaces) with following file structure: ├── client (workspace @client) │   ├── package.json │   └── tsconfig.json (extended tsconfig) ├── server (workspace @server) │   ├──...
Meloniemelony asked 25/10, 2019 at 8:18

2

Solved

In tsconfig.json you can define additional libs, that give you typings for HTML or DOM "libraries"(? I don't know the correct terminology). I don't understand why dom and dom.iterable are...
Surculose asked 17/3, 2022 at 10:0

6

Solved

I am working with Angular 11 and trying to use short imports like import {smthg} from '@common' instead of import {smthg} from '../../../common' But I always get errors in IDEA: TS2307: Cannot find...
Ayeaye asked 22/1, 2021 at 14:3

3

Solved

I had a jsconfig.json which I replaced with a tsconfig.json. Following the replacement, VSCode doesn't pick up path aliases and reports an import error: Example: Cannot find module '@Components/Tit...
Certify asked 22/11, 2021 at 22:3

0

I am trying to run typescript file (within an app) that depends on a couple libraries with NX but I can not figure out how to do it. I've tried numerous methods, here are a couple ways I tried: Fir...
Trapes asked 19/8, 2022 at 17:9

© 2022 - 2024 — McMap. All rights reserved.