linear
NextJS Deployment crashing with ERR_PNPM_NO_LOCKFILE
Project ID: 31d9b86c-db7f-44b7-8a2b-6d81ce651e2a
Basically the same as https://help.railway.app/questions/deployment-of-next-js-project-has-suddenl-31fd443e and the other ERR_PNPM issue.
My project is crashing with:
I have tried:
❌ Using pnpm v8 by having this in my package.json:
I actually never used v9.
❌ Using pnpm@latest as so:
This actually resulted in another error saying this format is invalid:
❌ Trying both the V2 and the Legacy runtime
❌ Deleting/Regenrating node_modules and pnpm-lock.yaml
What can I do?
5 replies
How to make request using private networking?
I have two services and want to make a call from service A to service B using private networking. When I try to make a request, I get the error:
I'm using http as specified in the docs here.
My request looks like this:
The request works when I make it via public networking.
Project ID: 1031bd42-29fd-490d-aa39-3bffdaef2fb1
17 replies
How to fix 'Application failed to respond' error and add Python (flask) to Nextjs app on Railway?
Context/What I want to do:
I have an app that uses nextjs and flask. I have the following folder structure:
and on start I want to run server.py and also npm start.
What I'm doing
Locally, I run
python server.py
to start the flask server and npm run build
to build the static nextjs files for my app. On Railway, I entered python server.py && yarn start
as the custom start command but then I get the "Application failed to respond" error on my page. When I remove the custom start command, Railway only runs yarn start and my page works again, but the Python flask server is not being started.
From the docs (https://docs.railway.app/guides/fixing-common-errors) it looks like Railway is unable to connect to my app, but the only thing I changed is to alter the start command to python server.py && yarn start
. The docs suggest to open the app on port 3000 which I tried with the command in the "What I tried" section.
What I tried:
- Changing the custom start command to python server.py && next start --port ${PORT-3000}
as specified in the docs above
- Using npm instead of yarn
- Changing the folder structure (with the nextjs and the flask app separeted) - that didn't change anything, and Railway then didn't autodetect the languages and so running npm for example didn't work since npm was not available
- Setting the custom build command to npm run --prefix .\client\ build
and the custom start command to python server/server.py && npm run --prefix .\client\ start
How can I fix this issue?45 replies