tsconfig Questions
1
I write a program with typescript in node js (not an API or web app) just a console app. I have configured the typescript configuration. but when I make a File Object it give me error
UnhandledProm...
Nietzsche asked 4/9, 2021 at 5:10
8
I'm trying to import package.json in my TypeScript application:
import packageJson from '../package.json';
My tsconfig.json contains the following:
{
"compilerOptions": {
"rootDir...
Desolation asked 18/4, 2019 at 20:16
2
Solved
I've been moving chunks of shared code into a library that we can pull into our other projects, and part of that includes some core styles.
I have the library itself working, eventually (griping ab...
Wenzel asked 15/7, 2022 at 7:30
6
I try to initialize database base via typescript.
my ts is like:
import { User, UserRole } from '../entity/User';
import crypto from 'crypto';
import {dbManager, pwhash } from '..';
async function...
Deductive asked 17/8, 2020 at 6:45
18
I am trying to setup aliases for my mock server. Whenever I try to compile ts files, it returns error that it couldn't find proper modules even though those are defined in tsconfig,json->paths
Fol...
Hersey asked 18/6, 2019 at 13:48
4
I get this error after ng serve:
ERROR in ./src/app/Modeles/utilisateurs.model.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: C:\Users\xx\src\app\Modeles\utilisa...
Juline asked 31/5, 2020 at 15:30
23
Solved
I'm trying to do something very similar to the jquery path example in the documentation, but TS keeps throwing TS2307 (webpack compiles fine):
"compilerOptions": {
"baseUrl": "./src",
"paths": {...
Yaw asked 4/6, 2018 at 10:58
1
Solved
I'm in the process of upgrading my front end libraries with the following commands.
ncu -u
npm install --legacy-peer-deps
The following have been updated that I believe are relevant.
typescript 4...
Pharisaic asked 9/5, 2023 at 20:54
3
I have a Monorepo which uses Typescript. I have a common folder which shows this error on the top of the file -> Entry point for implicit type library 'glob'. I am not sure what is wrong with th...
Dumbwaiter asked 23/6, 2022 at 18:7
1
I'm using a Yarn workspace monorepo structure in a TypeScript React project:
packages
admin
package.json
user
package.json
package.json // Workspace Root. Sets "workspaces": ["pa...
Metzgar asked 9/2, 2022 at 6:46
3
Solved
I have a project structure like the following:
.
└── my-app/
├── .configs/
│ ├── tsconfig.json
│ ├── webpack.merge.ts
│ ├── webpack.dev.config.ts
│ └── webpack.prod.config.ts
├── node_modules...
Rai asked 2/8, 2021 at 16:32
7
I have typescript and uses the aliases.
Here is part of tsconfig.json
"compilerOptions": {
"baseUrl": "./src",
...
},
By setting the base url, I can change
import User from "src/models/User.m...
Upheaval asked 4/12, 2019 at 15:47
10
Solved
I'm struggling with following "error" in VSCode :
Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'
Hence, react-scripts (create-react-app) automatically sets the ...
Seacock asked 23/11, 2020 at 18:56
20
Solved
I was reading about path-mapping in file tsconfig.json, and I wanted to use it to avoid using the following ugly paths:
The project organization is a bit weird because we have a mono-repository th...
Kutaisi asked 7/4, 2017 at 15:20
2
I have some custom .d.ts files and I want tsc to pick up these files when compiling. In order to get this done I modify the tsconfig.file to include the following
"typeRoots": [
"../node_modules/...
Outcaste asked 21/12, 2016 at 21:43
1
In my TypeScript project I'm extending express Request type to add own properties. I have a file src/types/index.d.ts that looks similar to this:
declare module 'express-serve-static-core' {
inter...
Saddle asked 16/9, 2022 at 7:47
1
Solved
I'm working on a React Native project that's part of a wider project with multiple packages. The folder structure of the project is as follows (excluding most of the irrelevant files):
monorepo
└──...
Secundas asked 1/8, 2023 at 11:15
4
Solved
I have a Node Express project with Angular added through Angular CLI, ie ng new.
I do not want the Angular output to wipe out the distribution folder.
I understand there is a delete-output-path ...
Diffident asked 2/4, 2018 at 7:38
1
Solved
I'm writing an interview question. I'm mocking a backend server by creating an "Http Client" package. Some of my types I want exposed in .d.ts files so that the interviewee has context, b...
Hobbema asked 2/10, 2021 at 18:3
2
Solved
I have a project that has the following file structure
project
|
├── App1/static/App1
| ├── ts
| ├── js
| └── tsconfig.json
|
├── App2/static/App2
| ├── ts
| ├── js
| └── tsconfig.json
|
├── App3/s...
Knoxville asked 14/11, 2022 at 20:30
3
Solved
I couldn't figure out why ts-node isn't resolving the alias when esm is enabled
I made a tiny project trying to isolate the issue as much as possible
package.json
{
"type": "module&...
Obeded asked 22/3, 2022 at 11:56
7
I am having some troubles after executing my angular application with npm start, 'ChainExpression' & 'ImportExpression'members of ESTree interface are not exported causing errors...
Please chec...
Ubiquitarian asked 2/6, 2021 at 14:20
5
Does anybody know how to fix this tsconfig error?
Flag 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence ...
Canadian asked 14/2, 2023 at 14:30
1
Solved
This issue seems to be all over GitHub's NX repository, however I was not able to find any working solution there.
My workspace contains two buildable libraries: ui/avatar and ui/icon and one publi...
Crucifer asked 31/8, 2022 at 5:26
1
I have a folder of typescript code that I want to share between two TS projects in a repo. It's various helper classes and DB models. They don't have unifying logic of their own, so it doesn't make...
Champ asked 4/4, 2023 at 9:25
© 2022 - 2024 — McMap. All rights reserved.