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

167
Visualizações
VUE npm module wrong file path source

so I have my own npm module made by vue js (REPO-A), let's say I install this module on my project (vue js too) (REPO-B). And I use an avatar component from that module, previously I have added an @error handler on my <img> tag like this to make the image default when something went wrong with the image resource,

handleErrorImage(e) {
  if (e.type === "error") e.target.src = require("../assets/defaultImage.svg")
}

it works as expected if I run on REPO-A and get the defaultImage.svg with the right path, but it's not working if I run on REPO-B, and I tried to look at the network panel, I think if I run on REPO-B the resource of the defaultImage.svg was the wrong path like this

RUN ON REPO-A enter image description here

RUN ON REPO-B enter image description here

the question is, how to make the defaultImage.svg path load correctly if the avatar component is used in REPO-B, thanks in advance

about 4 years ago · Juan Pablo Isaza
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