tsconfig Questions
1
When run eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore . script using npm run lint, the following error occurs.
/(somethingSomething...)/Test.vue
0:0 error Parsing error: "...
Interchangeable asked 24/11, 2021 at 9:41
3
When using GitHub Copilot Chat within Visual Studio Code, I've encountered an issue where TypeScript attempts to type check "temporary files" generated by Copilot. These files, identifiab...
Ethelyn asked 6/3 at 15:13
7
When running tsc, I am getting many TS2688: Cannot find type definition file for 'someLibrary'
These libraries came from node_modules. I have tried to exclude node_modules and skipLibCheck in tscon...
Elnoraelnore asked 27/8, 2020 at 10:3
3
Solved
I've got a folder structure like so:
- mono-repo
tsconfig.paths.json
- Website
tsconfig.json
- src
test.ts
index.ts
- Tool
- src
index.ts
// mono-repo/tsconfig.paths.json
{
"compilerOp...
Smithson asked 9/12, 2019 at 20:48
3
I was wondering what is better and what are the pros and cons of using "files" vs "include" in tsconfig?
I don't really like the include pattern because is just including all ts files in the src f...
Heilbronn asked 13/8, 2018 at 9:27
1
VSCode linting does not seem to respect the paths I defined in my tsconfig.json file.
I get the following error, when importing anything from an "alias" defined in my tsconfig.json.
tsco...
Carlyle asked 1/10, 2020 at 2:6
3
Solved
I have a webpack project with this in my "main.ts" module:
import {Elm} from "./MainModule";
it fails with:
TS2307: Cannot find module './MainModule'.
but when I switch my "tsconfig.json" fro...
Descent asked 16/12, 2018 at 15:16
3
Somehow the Angular (v11.0.4) language service in VSCode does not work anymore. I get the following error message.:
[Info - 17:52:04] Angular language server process ID: 147359
[Info - 17:52:04] Us...
Opah asked 12/1, 2021 at 17:7
1
I'm developing a TypeScript Node.js project with Next.js.
I have noticed that in the TypeScript configuration file tsconfig.json, it allows me to specify the values of the "target" and &q...
Exit asked 25/5, 2023 at 12:0
1
Solved
I want to use imports (import x from y) and top-level awaits at the same time with ts-node. However if I change my tsconfig.compilerOptions.module to es2017 or higher as required by top-level await...
Dinnage asked 6/5, 2022 at 21:5
4
I am using Jest with TypeScript. Despite the fact that my code works and I can build my project, Visual Studio Code throws me that error for all Jest methods (describe(), test()...):
Cannot find na...
Surra asked 12/10, 2020 at 11:6
6
Solved
Consider a simple typescript project with the following directory structure:
| package.json
| tsconfig.json
|
\---src
| app.ts
|
\---foobar
Foo.ts
Bar.ts
tsconfig.json has been configured...
Priedieu asked 21/2, 2017 at 0:18
15
I'm using tsc build tasks. Unfortunately I'm always getting the same errors from the node modules folder
Executing task: .\node_modules\.bin\tsc.cmd --watch -p .\tsconfig.json <
node_modules/@ty...
Hexylresorcinol asked 1/8, 2018 at 13:18
5
Solved
I found a solution here: Webpack & Typescript image import
But I am getting error for this:
[ts]
Types of property 'src' are incompatible.
Type 'typeof import("*.png")' is not assign...
Klan asked 29/6, 2018 at 11:9
3
I have installed React TS in Vite, but it is showing me an error in tsconfig.json. I can't figure out why because I haven't even tried to change the installed code yet. What is the reason?
[tsconfi...
Burning asked 20/4, 2023 at 13:4
11
Solved
Getting Cannot find module '' or its corresponding type declarations. when importing in Next.js project.
This happens on every single import. Preview
Yarn version : 3.1.0-rc.2
Next version: 11.1.2
...
Cud asked 18/9, 2021 at 22:4
5
I am getting this error six times on my tsconfig.json file at [1,1]:
Cannot find type definition file for 'body-parser'.
The file is in the program because:
Entry point for implicit type library ...
Leitman asked 30/3, 2022 at 8:20
7
Solved
Say I put my code under src and tests under spec:
+ spec
+ --- classA.spec.ts
+ src
+ --- classA.ts
+ --- classB.ts
+ --- index.ts
+ tsconfig.json
I want to only transpile src to the dist folder...
Carolinian asked 18/2, 2016 at 0:28
8
Here is the case. I am using Nrwl NX Monorepo. I have 2 libraries: lib-a and lib-b; both are publishable libraries created via NX.
Now I create a MyClass.ts in lib-a. Naturally under paths in works...
9
Solved
I'm trying to import some services using barrels and tsconfigs paths options but I can't get angular and vscode to get along.
If it works for one it doesn't for the other and viceversa...
My situ...
Cary asked 6/11, 2018 at 13:52
15
I am setting up a new project with Remix (remix.run) and I am trying to configure Cypress/ESLint for component testing. I have a TestComponent.cy.ts with some boilerplate code:
describe('TestCompon...
Knurled asked 12/11, 2022 at 13:48
5
I am using highland.js and have installed it with its type definition:
jq .dependencies package.json | grep highland
"@types/highland": "https://registry.npmjs.org/@types/highland/-/highland-1.14...
Octopod asked 14/12, 2016 at 14:21
3
I'm using Vite to create a new React + TypeScript project.
After creating the project, there are two TypeScript config files on the root folder: tsconfig.json and tsconfig.node.json. These are the ...
Agriculturist asked 27/4, 2022 at 11:30
3
Situation
npx nuxi init my-project-name
cd my-project-name
npm install
When I run this command, I get the error "defineNuxtConfig is not defined."
I have tried reinstalling node.js, but ...
1
Solved
I'm running npx jest test
Getting this error, no matter how I change my configuration:
error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esn...
Jeane asked 2/11, 2023 at 7:51
1 Next >
© 2022 - 2024 — McMap. All rights reserved.