R
Railway

✋|help

deploy logs say nuxt "start" is an unknown command. Production and development sites both crashed.

Cchino_494518/26/2023
😫
Solution:
yes nuxt start starts a development / preview app, definitely dont want to be running that in production, make sure your build command is nuxt build and your start command is node .output/server/index.mjs
make sure you set these commands in the scripts portion of your package.json and clear any build or start commands you may have set in your service settings
Jump to solution
Cchino_494518/26/2023
c456ec14-dbcb-44b0-8e8f-2c97ee12bf57
I pushed a navigation bugfix and everything was working beautifully as of ... 3 hours ago. My test users came back and gave production a green light. I have been referencing pages on prod since then. At just about an hour ago, the site started looking weird and then crashed.
I have tried redeploying and this is what I'm seeing in logs.
BBrody8/26/2023
doesn't nuxt start start a development server?
Cchino_494518/26/2023
I'm runnign this in my test environment right now. I'll check prod ...
hmmmmm And it's the same issue in prod. but my node_env is set to production ... I'm looking again at my node deployment.
And no nuxt start starts the server for production as well.
BBrody8/26/2023
nuxt 3 or 2?
Cchino_494518/26/2023
I'm running 3
BBrody8/26/2023
good choice
Cchino_494518/26/2023
my first nuxt3 app so maybe I'm wrong.
BBrody8/26/2023
i am in the process of confirming this
Cchino_494518/26/2023
Thanks for helping. We have an event running and people can't access our event page. 😦
BBrody8/26/2023
i cant find the nuxt cli docs lol
link me if you can find it
Cchino_494518/26/2023
.... looking now too
what I don't get is why the site was deployed and running fine. And three hours later it crashes and I start seeing these problems. It's been live on Railway for over a month with no changes to deployment.
Solution
BBrody8/26/2023
yes nuxt start starts a development / preview app, definitely dont want to be running that in production, make sure your build command is nuxt build and your start command is node .output/server/index.mjs
make sure you set these commands in the scripts portion of your package.json and clear any build or start commands you may have set in your service settings
Cchino_494518/26/2023
Okay I will try that now ...
BBrody8/26/2023
if it still doesnt work, please send me your package.json as a file
Cchino_494518/26/2023
okay create a script with the line you indicated above "prodserve": "node output/server/index.mjs" in my package.json . and updated my deploy setting for the "Start Command" to be "npm start prodserve" pushing develop to get the deploy triggered in my test env.
BBrody8/26/2023
not really what i said to do lol
Cchino_494518/26/2023
?
BBrody8/26/2023
give this another read over
Cchino_494518/26/2023
1. build command is nuxt build --- it is
2. start command is node output/server/index.mjs --- which it now is in a script entry I called "prodserve" in my package.json
3. "make sure you set these commands in the scripts portion of your package.json" -- exactly what is in 1 & 2 above
4. is it just the clearing out of the start and build commands? - I cleared out the npm run start entry and replaced it with prodserve
However my last test build succeeded and the site is running. I'll try that in prod.
BBrody8/26/2023
I did ask you to name it start for a reason, it works the same in the end though I guess
Cchino_494518/26/2023
BTW ... we missed a "." in the start script . lol it's actually 'node .output/server/index.mjs'
BBrody8/26/2023
good catch on that one
Mmjfw8/26/2023
resolved?
Cchino_494518/26/2023
I get where you were going with replacing actual "start"
So if I leave those settings blank in the deployment settings, then the deploy will look for standard scripts like "start" and "build"?
Prod is up! Yes, resolved. Thank you!
BBrody8/26/2023
correct, but you have it named prodserve and that's why I asked you to name it start
Cchino_494518/26/2023
understood
Thank you for your help.
BBrody8/26/2023
no problem 🙂
BBrody8/26/2023
don't worry, I added the period

Looking for more? Join the community!

Recommended Posts
CMD Line accessI freaking swear I hate this so much I JUST WANT TO BE ABLE TO USE THE COMMAND LINE <:sadcat:7868689Laravel cron jobsHow can I run php artisan schedule:work every minute?Postgres drops connection when inactive, is this by default?I'm developing a node app using AdonisJS@5 and on a prolonged inactivity period (more than 5 hours) Fontconfig to canvasHi, I've been using the node-canvas in default railway when I use that, only libuuid and libGL are ivolumehey guys! quick question, I've got a golang project. I need it to create a json file on railway and system ran out of memoryCan someone help me? When I try to run my react app i get this error message. > tuya_react_frontend@Litestar command not foundHey all apologies for the possibly silly question. I am looking to deploy this repo: https://github.save temporary archivesCan i save temporary pdfs to a back-end host ? I'm trying to save a pdf file from a client upload bHow to host websockets?This is my first time hosting socket server, how can i do that on railway? I docs there are only webI cannot use opencv2 and received ImportError: libgl.so.1 cannot open shared object file no such filCan anyone help me with that ??LibreofficeHi I need libreoffice installed to use in my code. I attempted using the below nixpacks.toml ``` [Random app crash, no logs or other indicatorWhen trying my healtcheck I get random crashes, no recent deploy was made, I don't see any logs on mModify build commandHow would I modify the build command so it does a pip install of `psycopg2` ? I was told to remove tPayment method removalHey, how do I remove my payment method? I opted in for a credit subscriptions but still see my crediDeploying crashedHello, i'm facing a problem when deploying my spring boot application to railway, my application worInternal server error when accessing TypebotI noticed that since yesterday the new installations with the Typebot template present the error IntRAILWAY_PUBLIC_DOMAIN replaces RAILWAY_STATIC_URLHi team, we've been hunting down a bug with our app today, occurring on many PR Environments and it'My Subscription issueHello dear support guys: I found that I have been downgraded to No Subscription.. If my memory is rIs it normal for hello world json to return in 600ms? - GO FIBERHelp setting up a monorepoI'm getting this error when deploying my project. I made sure no other deployments are running, but