Vite React app Deployment Failed

blueeyeswhitetofu
PRO

7 months 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

0 Replies

blueeyeswhitetofu
PRO

7 months ago

Vite React app Deployment Failed


blueeyeswhitetofu
PRO

7 months ago

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


7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

is this enough?

1326445109126107100


7 months ago

what service, and what environment please


blueeyeswhitetofu
PRO

7 months ago

its a vite react app inside a monorepo

1326445672039317500


7 months ago

please provide this info so i can look at the service


blueeyeswhitetofu
PRO

7 months ago

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


7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

kay ill try it now


blueeyeswhitetofu
PRO

7 months ago

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

1326447996430450700


7 months ago

May I try kicking off a deployment?


7 months ago

are you using node 22 locally?


blueeyeswhitetofu
PRO

7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

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

1326451698234822700


blueeyeswhitetofu
PRO

7 months ago

service name: otb-web


7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

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


7 months ago

locally?


blueeyeswhitetofu
PRO

7 months ago

yes


7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

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


7 months ago

sounds good!


blueeyeswhitetofu
PRO

7 months 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
PRO

7 months 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
PRO

7 months ago

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


blueeyeswhitetofu
PRO

7 months 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


7 months ago

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


blueeyeswhitetofu
PRO

7 months ago

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


7 months ago

guess it was a transient issue with npm


7 months ago

!s


Status changed to Solved brody 7 months ago


Vite React app Deployment Failed - Railway Help Station