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

355
Views
Módulo no encontrado: Error: no se puede resolver './App' desde React 18 con TypeScript

Obteniendo este error al intentar actualizar para reaccionar 18.

Me pregunto si tiene que ver con mis tipos de archivo. Estoy usando mecanografiado, así que supongo que tanto la aplicación como el índice deben terminar con un .tsx.

La aplicación y el archivo de índice están dentro de la misma carpeta (src)

 ERROR in ./src/index.tsx 12:0-24 Module not found: Error: Can't resolve './App' in 'C:\Users\CleverlyDone\Documents\GitHub\myProjectName\src'

Mis archivos son:

índice.tsx

 /** Vendor */ import React from "react"; /** Shared CSS */ import "./dist/css/index.css"; /** Entry Point */ import App from "./App"; /** Analytics */ // import reportWebVitals from "./reportWebVitals"; import { createRoot } from "react-dom/client"; const container = document.getElementById("app"); const root = createRoot(container!); root.render(<App />);

Aplicación.tsx

 /** Vendor **/ import React from "react"; /** CSS */ import "./dist/css/app.css"; export default function App() { return ( <div>Placeholder</div> ); }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Intenta agregar esto a tu tsconfig.json

 { "compilerOptions": { "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "noFallthroughCasesInSwitch": true, "jsx": "react-jsx" }, "include": [ "src", ] }
about 4 years ago · Juan Pablo Isaza Report

0

Probablemente el problema esté en su paquete Typescript webpack En su paquete web intente agregar ts y tsx

 module.exports = { //Rest of your code resolve: { extensions: ['.ts', '.tsx'], }, };
about 4 years ago · Juan Pablo Isaza Report
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!