Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

469
Vistas
React does not allow importing types from external folders (React + TypeScript)

I have a React project with TypeScript. I'm trying to import types from an external folder - outside of the React folder. However, React does not seem to allow this. I'm using craco on top of CRA to run the app.

Project: https://github.com/accord-dot-app/app

types/
- ...
- deps.types.ts

frontend/
- ...
- src/
-- index.tsx

types/deps.types.ts:

// ... imports

export interface Deps {
...
}

frontend/src/index.tsx:

import { Deps } from '.../deps.types.ts';

...

This is the error I get when running craco start.

File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
You may need an additional loader to handle the result of these loaders.
| import ChannelLeave from '@accord/backend/ws/ws-events/channel-leave';
|
> declare interface Deps {
|   channels: Channels;
|   /** @deprecated */

If I comment out the lines, I just get another error in a another similar type file.

How can the errors be removed?

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda