Error in npm run production using docker

my dockerfile:

COPY . .


# Image config
ENV SKIP_COMPOSER 1
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 staging
ENV APP_DEBUG true
ENV LOG_CHANNEL stderr

# Allow composer to run as root
ENV COMPOSER_ALLOW_SUPERUSER 1
FROM node:alpine as build
WORKDIR /var/www/html/public
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run production
RUN npm run build
CMD ["/start.sh"]

error logs:

my package.json script:

"scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "build": "vite build",
        "test": "echo \"Error: no test specified\" && exit 1",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },

even same error in npm run development
how to solve the issue ?

Hi,

The ERR_OSSL_EVP_UNSUPPORTED error has a long StackOverflow post with various solutions here: https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported

Alan

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