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

206
Views
TypeScript: importe el tipo desde la raíz del proyecto principal a mi paquete en node_modules

Estoy creando una biblioteca con una configuración que quiero personalizar agregando un archivo .prtcls.config.js en la raíz del proyecto. Cuando se instala mi biblioteca, existe dentro de la carpeta node_modules del proyecto.

Aunque puedo señalar el archivo correcto para la importación, aparece el siguiente error de TS:

 File '/path/to/project/.prtcls.config.js' is not under 'rootDir' '/path/to/project/node_modules/prtcls'. 'rootDir' is expected to contain all source files.ts(6059)

Aquí está el tsconfig en la carpeta /node_modules/prtcls :

 { "compilerOptions": { "allowJs": true, "alwaysStrict": true, "checkJs": true, "declaration": true, "incremental": true, "target": "ESNext", "rootDir": "./", // "baseUrl": "./", "outDir": "dist/", "module": "ESNext", "moduleResolution": "node", "esModuleInterop": true, "importHelpers": true, "forceConsistentCasingInFileNames":true, "removeComments":true, "strict":true, }, "include": ["../../.prtcls.config.js", "**/*.js"], // "exclude": ["dist/"] "exclude": ["node_modules", "lib", "tests"] }

¿Hay alguna forma de importar el objeto que se exportaría desde /path/to/project/.prtcls.config.js ?

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!