Errors when trying to complete the Getting Started Tutorial

New to Railway and currently going through the start-up guide after getting my domain up-and-running. I'm in the section of the Developing Locally half where I run railway run <cmd> but I get the following errors:
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$ railway run cmd
No such file or directory (os error 2)
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$ railway run <cmd>
-bash: syntax error near unexpected token `newline'
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$ railway run cmd
No such file or directory (os error 2)
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$ railway run <cmd>
-bash: syntax error near unexpected token `newline'
chipv@Hashi7M2J7M3:/mnt/c/Users/chipv/Documents/Railway/nextjs$
Solution:
from the output of railway --help:
run Run a local command using variables from the active environment
run Run a local command using variables from the active environment
so for example if you where to normally start your app with npm run start your new command with the cli would be railway run npm run start in the docs <cmd> is used a short placeholder to indicate the command you would normally run to start your app...
Jump to solution
9 Replies
Percy
Percy2y ago
Project ID: N/A
chipp_zanuff88
chipp_zanuff88OP2y ago
Project ID: 9e770b05-f236-4b56-9694-4a9c6038139a ^ Corrected
Solution
Brody
Brody2y ago
from the output of railway --help:
run Run a local command using variables from the active environment
run Run a local command using variables from the active environment
so for example if you where to normally start your app with npm run start your new command with the cli would be railway run npm run start in the docs <cmd> is used a short placeholder to indicate the command you would normally run to start your app
chipp_zanuff88
chipp_zanuff88OP2y ago
I see, that makes things a bit clearer Given that this is the tutorial project and I don't use either Postgres & NextJs for my day-to-day(full disclosure), it's not clear what to use for the <cmd> section
Brody
Brody2y ago
do you have any variables stored in the railway service?
chipp_zanuff88
chipp_zanuff88OP2y ago
Only the variables that were created during the start of the tutorial and first deployment, which I do see
Brody
Brody2y ago
the docs state
When developing locally, it's likely that you'll need environment variables to store sensitive connection strings.
When developing locally, it's likely that you'll need environment variables to store sensitive connection strings.
if you dont need/have variables in your railway service then you simply dont need to use railway run <cmd>
chipp_zanuff88
chipp_zanuff88OP2y ago
Gotcha. The tutorial made it seem like it a necessary step I think we can close this out. Thank you
Brody
Brody2y ago
no problem!
Want results from more Discord servers?
Add your server