Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

304
Visualizações
Why won't React.js load the images from my disk even when the specified path is correct?

I am a beginner. I was practicing and got stuck here. The path specified is correct, the name of the image on the product is right, still, it shows the error message. I am attaching the screenshots. Please let me know if anyone can help me with the issue.

ScreenshotScreenshoterrordisk

Folder structure

import product1 from '../../images/product-1.jpg';
import product2 from '../../images/product-2.jpg';
import product3 from '../../images/product-3.jpg';

export const productData = [
  {
    img: product1,
    alt: 'Game',
    name: 'Assassians Creed- Valhalla',
    desc: 'Assassins Creed Valhalla is a 2020 action role-playing video game developed by Ubisoft Montreal and published by Ubisoft.',
    price: '3,444',
    button: 'Add to cart'
  },

  {
    img: product2,
    alt: 'Game',
    name: 'Cyber Punk- 2077',
    desc: 'Cyberpunk 2077 is an action role-playing video game developed and published by CD Projekt.   ',
    price: '2999',
    button: 'Add to cart'
  },

  {
    img: product3,
    alt: 'Game',
    name: 'Metro Exodus',
    desc: 'Metro Exodus is a first-person shooter video game developed by 4A Games and published by Deep Silver.',
    price: '2199',
    button: 'Add to cart'
  }

];````



about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Capitalize your folder name in the import:

images > Images

about 4 years ago · Juan Pablo Isaza Relatório

0

Your code, data.js, is looking for files inside a directory "../../images", which does not exist in your folder structure. What does exist is "../../Images".

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda