Vite React app Deployment Failed
blueeyeswhitetofu
PROOP

a year ago

Hello, I ran into a build error for my react app when deploying
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1

previous deployments work just fine then out of nowhere all vite react app deployments ran into this issue when building.
please help me with this issue!

Solved

31 Replies

blueeyeswhitetofu
PROOP

a year ago

Vite React app Deployment Failed


blueeyeswhitetofu
PROOP

a year ago

9052220c-21ed-4e28-94d4-d33cc322523c


a year ago

hello, can you please scroll further up in the logs so that you can read the error that caused the failed build


blueeyeswhitetofu
PROOP

a year ago

is this enough?

1326445109126107100


a year ago

what service, and what environment please


blueeyeswhitetofu
PROOP

a year ago

its a vite react app inside a monorepo

1326445672039317500


a year ago

please provide this info so i can look at the service


blueeyeswhitetofu
PROOP

a year ago

ah okay, do you just need the names of the services and enviroment?
service name: saleshub-web
environment: staging


a year ago

long shot but can you try to set a NIXPACKS_NO_CACHE variable to 1 please


blueeyeswhitetofu
PROOP

a year ago

kay ill try it now


blueeyeswhitetofu
PROOP

a year ago

It still hits the same error but without the --mount=type=cache

1326447996430450700


a year ago

May I try kicking off a deployment?


a year ago

are you using node 22 locally?


blueeyeswhitetofu
PROOP

a year ago

Yes but we can go for node 20 if its an issue


blueeyeswhitetofu
PROOP

a year ago

oh but there is another similar service that is having the exact same issue but with node 20

1326451698234822700


blueeyeswhitetofu
PROOP

a year ago

service name: otb-web


a year ago

delete you local node_modules, are you able to run npm i while cd'd into the frontend folder?


blueeyeswhitetofu
PROOP

a year ago

it hits this error
npm ERR! Unsupported URL Type "workspace:": workspace:*


a year ago

locally?


blueeyeswhitetofu
PROOP

a year ago

yes


a year ago

well then it stands to reason if you fix that error you could also fix the failed build on railway


blueeyeswhitetofu
PROOP

a year ago

ah okay ill try fixing this issue then give any updates here


a year ago

sounds good!


blueeyeswhitetofu
PROOP

a year ago

hmm but something im still lost at is why all my other vite react service is having this issue also, seems kinda out of nowhere


blueeyeswhitetofu
PROOP

a year ago

For local build i usualy use pnpm, so i dont usually run into this issue, could me using pnpm for the monorepo build is whats causing the issue with npm?


blueeyeswhitetofu
PROOP

a year ago

im still having trouble trying to solve why the npm i doesnt go through :/


blueeyeswhitetofu
PROOP

a year ago

I tried re deploying a running vite react app set up the same way and the service ran into the same error, even though i didnt change any configs or code


a year ago

pnpm will be used as long as a pnpm lock file is found


blueeyeswhitetofu
PROOP

a year ago

okay, so i did not change anything and did a redeploy and it went through as normal :/ I guess its solved for now


a year ago

guess it was a transient issue with npm


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...