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

166
Views
Los archivos nuxt-img y js no se pueden cargar en el modo de producción en el servidor

Estoy aprendiendo Nuxt JS, y está bien en mi computadora local hasta que quiero intentar implementarlo en el servidor. Es solo una aplicación simple, solo imagen y texto, pero cuando lo implemento en el servidor, la imagen no t carga Estoy usando PM2 para implementar mi aplicación en mi Ubuntu VPS

Ustedes pueden ver el error en https://bappedabjn.id como se ve así ingrese la descripción de la imagen aquí

EDITAR :

Lo siento, no incluí detalles.

Aquí es donde pongo la imagen en static/img/logo.png

ingrese la descripción de la imagen aquí

Y aquí como llamé a la imagen.

 <nuxt-img src="/img/logo.png" width="100" class="mb-10" />

Y, por último, aquí está mi nginx.conf para @Lykos94 preguntándolo

 proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Traté de crear un nuevo proyecto NuxtJS basado en su información y agregué @nuxt/image y logré reproducir su problema. Actualmente está utilizando la opción target: 'server' (o none, y es la predeterminada) en su nuxt.config.js , que requiere tener una configuración adicional para que pueda usar el @nuxt/image .

En particular, debe seguir la siguiente guía en este enlace y agregar esto a sus complementos:

 import { createIPX, createIPXMiddleware } from "ipx"; // https://github.com/unjs/ipx const ipx = createIPX({ dir: "static/", // absolute path to images dir }); export default createIPXMiddleware(ipx);

Después de seguir la guía, logré ejecutar npm run build y ejecutar mi servidor en producción, mostrando correctamente la imagen.

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!