R
Railway10mo ago
Sky

I can't get my frontend vue3+vite app to build in my monorepo

I've been plagued by error after error, but i feel like I keep getting closer and closer. I am running a .net back end with a vue + vite front end. I have set up the .net and vue front end separately on railway, but I have them set up to do a proxy and launch together when i debug locally. Because of this, i think it's just been super problematic getting a production ready build for vite on railway. I am not totally sure. Project ID: 730d9df6-b69f-4114-b4ca-d92859e4f4b0 Here is the error i'm currently getting:
No description
26 Replies
Percy
Percy10mo ago
Project ID: 730d9df6-b69f-4114-b4ca-d92859e4f4b0
Brody
Brody10mo ago
I assume you've ran a build locally without issues right?
Sky
SkyOP10mo ago
Yeah I can build locally without any issues. I also have the full build log here if this is helpful:
Brody
Brody10mo ago
what version of node do you use locally
Sky
SkyOP10mo ago
would that just be determined by running node -v? if so, v20.9.0
Brody
Brody10mo ago
try setting engines.node to 20 in your package.json then your also trying to run a development server on railway by the looks of it, vite doesn't come with a production ready web server but we'll tackle that after the build doesn't fail
Sky
SkyOP10mo ago
would it just be like this?
No description
Sky
SkyOP10mo ago
pushing now, getting this now:
No description
Brody
Brody10mo ago
is the build using node 20 now?
Sky
SkyOP10mo ago
No description
Sky
SkyOP10mo ago
I believe so
Brody
Brody10mo ago
send your package.json please
Sky
SkyOP10mo ago
Brody
Brody10mo ago
I see react-fontawsome, but I'm not seeing vue-fontawsome I'm not sure why you're installing react-fontawsome though?
Sky
SkyOP10mo ago
Shouldn't even have react-fontawesome, was testing something earlier trying to get it work with a react template. But i dont believe there is a specific vue front awesome, is there? Removing react now
Brody
Brody10mo ago
you're trying to import it, so check
Sky
SkyOP10mo ago
No specific vue font awesome, just the standard ones. Font awesome does have specific react imports. I've removed it, re-ran. Same error
Brody
Brody10mo ago
delete your local node_modules, reinstall them, and then try another build
Sky
SkyOP10mo ago
something broke locally, and i cant run a build anymore. Sorry, give me a minute to figure this out. Alright, I deleted the node_modules folder, tried to reinstall and just started running into non-stop errors running locally. Ended up just scrapping and redoing the the vue project. After i finished and committed the changes, it does look like the railway server builded successfully I am not sure if its working, i think you mentioned something about running a dev server on railway
Brody
Brody10mo ago
yep now let's tackle that https://github.com/railwayapp-templates/vue-starter copy the nixpacks.toml and Caddyfile from this repo into yours
Sky
SkyOP10mo ago
Okay that is done
Brody
Brody10mo ago
does it work?
Sky
SkyOP10mo ago
it keeps crashing, with the following error
No description
Brody
Brody10mo ago
if you have a custom start command set in the service settings please remove it
Sky
SkyOP10mo ago
It's been deployed and running for 45 minutes! Thanks for you help!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server