Can't seem to be able to upgrade Strapi railway version

System Information
  • Strapi Version: 4.5.1
  • Operating System: MacOS
  • Database: Postgres
  • Node Version: 16.13.0
  • NPM Version: 8.1.0
  • Yarn Version: 1.22.19

Hello there,
I am new to railway, but not to Strapi. However, I just setup a railway account, and spun up an instance of Strapi and Postgres. However when I visited the domain URL, and signed in I noticed the version of Strapi is a couple of versions behind (v4.1.9 as opposed to v4.5.1 which is the latest). I would like to upgrade this, and I tried via the package.json, ran yarn command, and finally yarn build as suggested by the docs here: Update Strapi version - Strapi Developer Docs

The issue is:
How do I push the changes from my local (clone of my strapi github installation) to reflect on the hosted strapi on railway. Please keep in mind that Strapi instance on railway was generated and connected a github repo that was cloned.

Upon running yarn develop I got this error:

[2022-12-05 11:52:18.360] debug: ⛔️ Server wasn't able to start properly.
[2022-12-05 11:52:18.365] error: Middleware "strapi::session": App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])
Error: Middleware "strapi::session": App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])

How do I resolve this?

Any pointers will be very much appreciated.

Thanks

You need to update Strapi locally, and then push those change to the Github repo. Then Railway will get those changes.

Remove package-lock.json from pushing to github and then try to deploy. For me it solved problem.