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

248
Views
No se puede encontrar el módulo 'reaccionar' cuando se usa una biblioteca de interfaz de usuario de React de terceros - Vite + Preact

Estoy enfrentando este problema en este repositorio iniciado por Vite.

https://github.com/vicainelli/vite-starter

Estoy usando Vite + Preact + Vitest + Biblioteca de pruebas

Si estoy probando cualquier código dentro del código base, funciona bien, pero si la prueba se ejecuta en algún componente que usa otro componente de una biblioteca externa, aparece este error.

 ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/components/Button.test.js [ src/components/Button.test.js ] ❯ Object.<anonymous> node_modules/@mantine/styles/cjs/theme/MantineProvider.js:5:13 Test Files 1 failed | 1 passed (2) Tests 2 passed (2) Error: Cannot find module 'react' Require stack: - /home/runner/work/vite-starter/vite-starter/node_modules/@mantine/styles/cjs/theme/MantineProvider.js - /home/runner/work/vite-starter/vite-starter/node_modules/@mantine/styles/cjs/index.js ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Esto es algo similar a este problema , pero ya estoy usando preact/compact, así que no tengo idea de lo que estoy haciendo mal.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Querrás ejecutar lo siguiente:

 yarn add react@npm:@preact/compat react-dom@npm:@preact/compat

Parece que Vitest no puede crear un alias de manera efectiva.

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!