Ghost Order
Ghost Order
Explore posts from servers
RRailway
Created by Ghost Order on 4/3/2024 in #✋|help
Installing dependencies for sub directories
My project have this structure
root/
├── client/ (React app)
| ├── .env
| ├── .package.json
| └── src/
├── server/ (Node server)
| ├── .env
| ├── .package.json
| └── src/
└── package.json
root/
├── client/ (React app)
| ├── .env
| ├── .package.json
| └── src/
├── server/ (Node server)
| ├── .env
| ├── .package.json
| └── src/
└── package.json
To run it successfully one have to: 1. install dependencies for both client and server. 2. build the client. 3. start the server In the root's package.json I have this script to install client and server dependencies:
"install": "npm install --prefix client & npm install --prefix server"
"install": "npm install --prefix client & npm install --prefix server"
In local development this works, dependencies both for client first and then server are installed, although the process doesn't exit on its own, I have to manually press Ctrl-C, but then all the next steps work just fine and I can run the application as expected. However when deploy it to railway although it installs the dependencies it fails at the next step (build) because it cannot find both react-script and rimraf, which are necessary to run the build script, which leds me to think that it is not installing the dependencies correctly how can I tell railway to install dependencies for client/ and server/?
39 replies
RRailway
Created by Ghost Order on 3/20/2024 in #✋|help
ram usage local vs production
Hello, I realized the memory consumption of my nextjs app differs between local and prod, when I run it locally pm2 shows 68mb on memory consumption whereas in production the same app consumes 370mb more or less on average. Is it normal that an app consumes more memory in production than in local?
19 replies
RRailway
Created by Ghost Order on 1/17/2024 in #✋|help
Error: getaddrinfo ENOTFOUND postgres.railway.internal
I'm trying to connect a node app to a postgresql database (both are in the same railway project) through the private network so I'm using the DATABASE_PRIVATE_URL in my node app, but then I get this error in the logs Error: getaddrinfo ENOTFOUND postgres.railway.internal. Before I was connecting my node app to my postgresql database through the public url (so using DATABASE_URL env variable) and all was going fine, but then I realized the higher costs this public connection implies (rookie mistake) so I changed it to the private network however now I have this issue.
38 replies
RRailway
Created by Ghost Order on 1/5/2024 in #✋|help
code deployment disabled in a new account
Hello, I'm trying to setup a fresh new account for a client of mine, and for some reason I can't deploy any project, when I go to the dashboard a yellow message appears: "We couldn't enable code deployments for your Trial. Upgrade to a paid plan to deploy code." If I remember correctly, the first time I created my personal account I just created it and was able to deploy github repos right for the get go, so I don't understand why I can't in this new account, at first I thought it was because I set my client's github account as private, but then I set it as public and the issue persists. What I'm missing here?
11 replies