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