Deployment Failed during build process with nodejs

It's been 11 days since I made a commit and the deployment worked correctly, and today I pushed to my main branch and the publication failed, what could be happening?
No description
No description
Solution:
delete the nixpacks.toml file and try this Dockerfile instead ```dockerfile FROM node:20.10.0-alpine ENV NODE_ENV production...
Jump to solution
20 Replies
Percy
Percy9mo ago
Project ID: a2d0a173-be4f-421a-b1b0-ada4f0b76aa2
maldonadomoss
maldonadomoss9mo ago
a2d0a173-be4f-421a-b1b0-ada4f0b76aa2
Brody
Brody9mo ago
try adding a nixpacks.toml to your project with this in it
[phases.setup]
nixLibs = ['...', 'zlib']
[phases.setup]
nixLibs = ['...', 'zlib']
maldonadomoss
maldonadomoss9mo ago
still the same error I create a file in the root project nixpacks.toml with the code
Brody
Brody9mo ago
can you share your repo?
maldonadomoss
maldonadomoss9mo ago
No description
Brody
Brody9mo ago
i meant a link to your repo
maldonadomoss
maldonadomoss9mo ago
its privated
Brody
Brody9mo ago
add me?
maldonadomoss
maldonadomoss9mo ago
Yes
Brody
Brody9mo ago
brody192
maldonadomoss
maldonadomoss9mo ago
Brody Over? Ready
Brody
Brody9mo ago
what node version do you use locally?
maldonadomoss
maldonadomoss9mo ago
v20.10.0
Brody
Brody9mo ago
seems like youre storing uploads in github. you would want to get that removed and make sure to gitignore the contents of that folder
Solution
Brody
Brody9mo ago
delete the nixpacks.toml file and try this Dockerfile instead
FROM node:20.10.0-alpine

ENV NODE_ENV production
ENV NPM_CONFIG_UPDATE_NOTIFIER false
ENV NPM_CONFIG_FUND false

RUN apk add --update --no-cache \
libuuid \
build-base \
pkgconf \
pixman \
cairo-dev \
pango-dev \
jpeg-dev \
giflib-dev

WORKDIR /app

COPY package*.json ./

RUN npm ci

COPY . ./

CMD ["npm", "run", "prod"]
FROM node:20.10.0-alpine

ENV NODE_ENV production
ENV NPM_CONFIG_UPDATE_NOTIFIER false
ENV NPM_CONFIG_FUND false

RUN apk add --update --no-cache \
libuuid \
build-base \
pkgconf \
pixman \
cairo-dev \
pango-dev \
jpeg-dev \
giflib-dev

WORKDIR /app

COPY package*.json ./

RUN npm ci

COPY . ./

CMD ["npm", "run", "prod"]
maldonadomoss
maldonadomoss9mo ago
Ready, Its Worked Thanks
Brody
Brody9mo ago
awesome!
Want results from more Discord servers?
Add your server