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:
26 Replies
Project ID:
730d9df6-b69f-4114-b4ca-d92859e4f4b0
I assume you've ran a build locally without issues right?
Yeah I can build locally without any issues. I also have the full build log here if this is helpful:
what version of node do you use locally
would that just be determined by running node -v?
if so, v20.9.0
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 failwould it just be like this?
pushing now, getting this now:
is the build using node 20 now?
I believe so
send your package.json please
I see react-fontawsome, but I'm not seeing vue-fontawsome
I'm not sure why you're installing react-fontawsome though?
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
you're trying to import it, so check
No specific vue font awesome, just the standard ones. Font awesome does have specific react imports. I've removed it, re-ran. Same error
delete your local node_modules, reinstall them, and then try another build
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
yep now let's tackle that
https://github.com/railwayapp-templates/vue-starter
copy the nixpacks.toml and Caddyfile from this repo into yours
Okay that is done
does it work?
it keeps crashing, with the following error
if you have a custom start command set in the service settings please remove it
It's been deployed and running for 45 minutes! Thanks for you help!
no problem!