Paul
Paul
RRailway
Created by Paul on 1/17/2024 in #✋|help
puppeteer: Failed to launch the browser process!
thank you @Brody for your help ! The solution was to add chrome in the dockerfile and change the PUPPETEER env variable
FROM node:18-alpine as builder

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json yarn.lock ./

RUN yarn install

COPY . .

RUN yarn build

FROM node:18-alpine

RUN apk add --no-cache chromium

USER node
# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json yarn.lock ./

# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_CACHE_DIR=/home/web/.cache

RUN yarn install

COPY --from=builder /usr/src/app/dist ./dist

CMD [ "node", "dist/main.js" ]
FROM node:18-alpine as builder

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json yarn.lock ./

RUN yarn install

COPY . .

RUN yarn build

FROM node:18-alpine

RUN apk add --no-cache chromium

USER node
# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json yarn.lock ./

# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_CACHE_DIR=/home/web/.cache

RUN yarn install

COPY --from=builder /usr/src/app/dist ./dist

CMD [ "node", "dist/main.js" ]
10 replies
RRailway
Created by Paul on 1/17/2024 in #✋|help
puppeteer: Failed to launch the browser process!
and lyk 🙂
10 replies
RRailway
Created by Paul on 1/17/2024 in #✋|help
puppeteer: Failed to launch the browser process!
ok thank you i'm gonna try that
10 replies
RRailway
Created by Paul on 1/17/2024 in #✋|help
puppeteer: Failed to launch the browser process!
i still have the same error, do i have to specify something in railway? i use a dockerfile to build the api
10 replies
RRailway
Created by Paul on 1/17/2024 in #✋|help
puppeteer: Failed to launch the browser process!
<:blob_help:1149662715409874944>
10 replies