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é