Laravel 9 vite manifest.json not found

Hi, just wanted to ask how to setup npm install and run build on docker, I followed the instructions from the Deploy a PHP Web App with Laravel and Docker | Render then added some files, but deployment was always failed. I’m basically new to docker.

Heres the error on deployment

Heres my dockerfile setup

`FROM richarvey/nginx-php-fpm:3.1.3

COPY . .

Image config

ENV SKIP_COMPOSER 2
ENV WEBROOT /var/www/html/public
ENV PHP_ERRORS_STDERR 1
ENV RUN_SCRIPTS 1
ENV REAL_IP_HEADER 1

Laravel config

ENV APP_ENV production
ENV APP_DEBUG true
ENV LOG_CHANNEL stderr

Allow composer to run as root

ENV COMPOSER_ALLOW_SUPERUSER 1

FROM node:19-alpine

WORKDIR /app

COPY [“package.json”, “package-lock.json*”, “./”]

RUN npm install
RUN npm run build

CMD [“npm”, “run”, “/start.sh”]`

Hi Juan,

It looks like you either haven’t pushed an index.html file with your application, or you haven’t configured your application to use library mode: https://vitejs.dev/guide/build.html#library-mode

Regards,
Keith

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.