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
Percy8mo ago
Project ID: a2d0a173-be4f-421a-b1b0-ada4f0b76aa2
maldonadomoss
maldonadomoss8mo ago
a2d0a173-be4f-421a-b1b0-ada4f0b76aa2
Brody
Brody8mo ago
try adding a nixpacks.toml to your project with this in it
[phases.setup]
nixLibs = ['...', 'zlib']
[phases.setup]
nixLibs = ['...', 'zlib']
maldonadomoss
maldonadomoss8mo ago
still the same error I create a file in the root project nixpacks.toml with the code
Brody
Brody8mo ago
can you share your repo?
maldonadomoss
maldonadomoss8mo ago
No description
Brody
Brody8mo ago
i meant a link to your repo
maldonadomoss
maldonadomoss8mo ago
its privated
Brody
Brody8mo ago
add me?
maldonadomoss
maldonadomoss8mo ago
Yes
Brody
Brody8mo ago
brody192
maldonadomoss
maldonadomoss8mo ago
Brody Over? Ready
Brody
Brody8mo ago
what node version do you use locally?
maldonadomoss
maldonadomoss8mo ago
v20.10.0
Brody
Brody8mo 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
Brody8mo 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
maldonadomoss8mo ago
Ready, Its Worked Thanks
Brody
Brody8mo ago
awesome!
Want results from more Discord servers?
Add your server