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

229
Views
importar archivos desde el directorio principal/otro en reaccionar

¿Cómo importo archivos de los directorios principales/otros en mi proyecto de reacción? Quiero importar imágenes de la carpeta de images pero encontré un error Module not found: Error: Can't resolve '../assets/images/Web_SVG.svg'.

Estructura de mi proyecto:

 -- src ==> assets --> Images --> "Web_SVG.svg" (Image I want to import) ==> components --> pages - Home.js (File I'm working on) ==> Other Files (index.js, App.js, etc)

Probé algunas soluciones de esta pregunta aquí Pero no funciona para mí.

Código para Home.js

 import React from 'react'; //Importing Img import { img } from '../assets/images/Web_SVG.svg'; export default function Home() { return ( <> <div className="flex bg-red-50"> <div> <img src={img} alt="" /> </div> </div> </> ) }
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!