Questions tagged [tsconfig-paths]

69 questions
2
votes
1 answer

Run typescript build with tsconfig-paths using pm2

I am trying to run the build (.js files) of typescript with the tsconfig-paths in production, I have no problem running typescript with paths. Just when running the build on production with pm2. I have tried: apps: [ { name: 'app', script:…
2
votes
1 answer

Angular jest doesn't understand import path after update to 27

This is a weird error. So I updated jest to 27 and all stopped working It seems to have issues with import paths. So the following import { something } form 'src/app/components/.....'; doesn't work, but this does: import { something } from…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
2
votes
1 answer

React tsconfig-paths not find module

I have tsconfig-paths version 3.9.0 configured in my tsconfig.json in the following way: tsconfig.json: { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, …
Matheus Carvalho
  • 415
  • 7
  • 13
2
votes
1 answer

TypeScript compiler error while finding absolute paths mentioned in `tsconfig.json`

I have the following directory structure: . ├── \ .babelrc ├── README.md ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │   ├── icon128.png │   ├── icon16.png │   ├── icon48.png │   ├── manifest.json │   └── popup.html ├──…
deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
2
votes
1 answer

cannot run compiled typescript prog using module resolution

I'm trying to compule the following typscript file import { magic } from 'lib/magic'; magic(); The filestructure is: ./src/ main.ts lib/ a/magic.ts b/magic.ts Inside tsconfig.json I map lib/magic to the right file as…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
1
vote
0 answers

svelte + rollup + typescript + tsconfig paths: Make files with .svelte extension importable by absolute path

Does anyone possess secret knowledge how to make this work? I am trying to migrate from relative to absolute imports using tsconfig paths and having problems with resolution of *.svelte files. tsconfig.json: { "extends":…
Evgeny A.
  • 731
  • 2
  • 8
  • 19
1
vote
1 answer

TypeError: (0 , tsoa_1.Get) is not a function

I'm using tsconfig-paths and tsoa in a project. I used tsconfig-paths following with document. Please get code here. I got error after running debug: /home/tailt/.nvm/versions/node/v19.1.0/bin/node -r…
Tai Lu
  • 43
  • 7
1
vote
1 answer

tsconfig paths with jest.config

I would like to use the paths functionality of the tsconfig. But when using it with jest I am getting problems. This is the guide I followed to implement this:…
sev
  • 1,500
  • 17
  • 45
1
vote
0 answers

tsconfig-paths in production not working with pm2 cluster mode

My goal is to run a typescript project, compiled for the production, launched in cluster mode with pm2. For development purposes, I used relative paths. This is the project in its simplest form : src/app.ts: import { ModuleA, ModuleB } from…
1
vote
0 answers

webpack enhanced-resolve plugin not working

I'm trying to follow these instructions by the developers themesevles at https://github.com/webpack/webpack/issues/6817#issuecomment-542448438 which doesn't work. I'm going to explain the problem but first lets see my project structure. my file…
ClassY
  • 744
  • 5
  • 20
1
vote
0 answers

Typo3 TSPage-Config: Accessing the flexform-xml fails

i use the bootstrap_package in one project, but the problem is related to accessing felements within the xml in the flexform-databse-column of tt_content (Typo3 v11). Assuming i have a card_group element with items in it, i tried: TCEFORM { …
1
vote
0 answers

How to automatically look for index files with absolute path?

I'm creating a new project with node.js, express.js and typescript. I decided to use absolute paths, but I'm not very satisfied, because when I import files, it doesn't recognize automatically index.ts files. My folder structure: |--routes | …
Henrique
  • 123
  • 1
  • 9
1
vote
0 answers

Angular won't recognise absolute paths aliases in tsconfig.json

I try to use the shorthands via tsconfig.json paths, but it always run into errors while compiling. I show some of my code below. Further I wonder if it's possible to use the shorthand somehow like this in html:
1
vote
0 answers

Cannot find module or its corresponding type declarations - react typescript craco

Its very basic problem but not work... I created fresh create-react-app and installed craco for relatives paths, but vsCode still give me error during imports. craco.config.js const path = require('path'); module.exports = { webpack: { alias:…
1
vote
1 answer

Module not found: Can't resolve 'components/Card Container/CardContainer' in 'D:\FoodOderingApp\Client\screens\Item Listing'

{ "compilerOptions": { "target": "es6", "strictNullChecks": true, "allowSyntheticDefaultImports": true, "jsx": "react-native", "lib": ["dom", "esnext"], "moduleResolution": "node", "noEmit": true, "skipLibCheck":…
Cheng Yang
  • 46
  • 3