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

344
Views
Vue3, Vite, Docker: Vite no puede encontrar archivos en la compilación de docker (y también en netlify)

EDITAR: también intento implementar mi aplicación a través de netlify y aparece el mismo error.

Mi Dockerfile - por el bien de esto. La raíz de mi proyecto se llama aplicación.

 # build stage FROM node:14.15.5 as build-stage WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build # production stage FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"

Mi vite.config.js

 import { fileURLToPath, URL } from 'url'; import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], server: { host: true, port: 8080, }, resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), '~@': fileURLToPath(new URL('./src', import.meta.url)), }, }, });

el error que me sale

 > [build-stage 6/6] RUN npm run build: #14 0.596 #14 0.596 > app@0.0.1 build /app#14 0.596 > vite build #14 0.596 #14 0.846 vite v2.9.9 building for production... #14 1.015 transforming... #14 3.220 ✓ 51 modules transformed. #14 3.221 [vite:css] ENOENT: no such file or directory, open '/app/src/assets/fonts/Shentox-light.ttf' #14 3.221 file: /app/src/App.vue?vue&type=style&index=0&scoped=true&lang.css #14 3.221 error during build: #14 3.221 Error: ENOENT: no such file or directory, open '/app/src/assets/fonts/Shentox-light.ttf'

Cuando ejecuto npm run build sin docker, funciona. ¿Alguna idea?

Gracias -Café

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!