Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
No se puede encontrar el alias de ruta del módulo definido en tsconfig

La estructura de mi aplicación es la siguiente:

 myApplication ├── app │ ├── api │ ├── services │ └── db │ ├── index.ts │ └── config.ts │ ├── test │ └── helpers │ └── setupTests.ts │ └── tsconfig.json

y he definido los siguientes alias de ruta dentro tsconfig.json :

 { "compilerOptions": { "baseUrl": "./", "paths": { "@/*": ["*"], "@Api/*": ["app/api/*"], "@Services/*": ["app/services/*"], "@Db/*": ["app/db/*"], }, "outDir": "dist", "sourceMap": true, "plugins": [ { "transform": "typescript-transform-paths" } ] } }

usar cualquiera de los alias de ruta en un archivo dentro de app/ funciona bien, pero cuando se ejecuta la aplicación con la siguiente importación dentro test/helpers/setupTests.ts :

 import config from '@Db/config';

Recibo el siguiente error: Error: Cannot find module '@Db/config' . ¿Cómo se puede arreglar esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!