#error: unrecognized subcommand 'connect'

34 messages · Page 1 of 1 (latest)

fast flare
#

I have a postgresql database set up. I have had no problems connecting before using railway connect Postgres
but now I get an error: error: unrecognized subcommand 'connect'

I have tried searching online and searching this discord, along with many attempts with chat gpt, I am at a loss as to how to connect. I am sure the CLI is installed because I can login and use the commands. Am I misunderstanding the documentation?

The project id is 0ab002a1-d07d-4f63-a686-e7426f5de920

raw scarabBOT
#

Project ID: 0ab002a1-d07d-4f63-a686-e7426f5de920

fast flare
grim heron
#

what version of the CLI are you on? latest is 3.0.19

fast flare
#
railwayapp 3.0.13```
#

I ran the npm install command. I don't know why it is not version 3.0.19

grim heron
#

old version but I don't think the connect command has been touched for a while anyway

#

by touched I mean modified or changed since 3.0.13

fast flare
#

It worked before, I feel like I have to have done something, all the railway commands listed work fine, but I don't see connect in the list

#

If it helps here are the commands it gives me:


Usage: railway.exe [OPTIONS] <COMMAND>

Commands:
  add          Add a new plugin to your project
  completion   Generate completion script
  delete       Delete plugins from a project
  domain       Generates a domain for a service if there is not a railway provided domain
  docs         Open Railway Documentation in default browser
  environment  Change the active environment
  init         Create a new project
  link         Associate existing project with current directory, may specify projectId as an argument
  list         List all projects in your Railway account
  login        Login to your Railway account
  logout       Logout of your Railway account
  logs         View the most-recent deploy's logs
  open         Open your project dashboard
  run          Run a local command using variables from the active environment
  service      Link a service to the current project
  shell        Open a subshell with Railway variables available
  status       Show information about the current project
  unlink       Disassociate project from current directory
  up           Upload and deploy project from the current directory
  variables    Show variables for active environment
  whoami       Get the current logged in user
  help         Print this message or the help of the given subcommand(s)

Options:
      --json     Output in JSON format
  -h, --help     Print help
  -V, --version  Print version```
grim heron
#

oh sorry for the incorrect information, 3.0.13 does not have the connect command

fast flare
#

oh! That explains it!

grim heron
#

just checked the 3.0.13 tag on the github repo and there's no connect command, the connect command was added last week

#

so the latest cli version will have it

fast flare
#

How do I get the lastest version, running npm i -g @railway/cli gives me 3.0.13

grim heron
#

do you have scoop installed?

fast flare
#

I do not

grim heron
#

good scoop is stupid

fast flare
#

haha ok, l have no idea what that is. 😂

grim heron
#

download the latest release from the github releases then extract the railway executable into a railway folder and add that folder to your PATH

fast flare
#

Ok, I'll give that a shot

grim heron
#

for the entirety of my time using railways cli I have never installed it from npm or any package manager, I wrote my own cli to download and extract the railway cli straight from the github releases

#

too many issues with downloading it from a package manager like npm

fast flare
#

Thank you so much for your help!

grim heron
#

no problem!

fast flare
#

I am newer to this, when I run railway even after removing it from my npm it still runs the older version, when it should be a dead command. Where else would it be installed?

grim heron
#

see what I'm talking about when I say too many issues with the npm downloaded cli

#

I don't remember where global npm packages are stored, I'm sure Google has the answer though

fast flare
#

Oh ok, I need to find this global location. That must be the source of my pain.

grim heron
#

definitely

fast flare
#

I have found my problem, its pnpm. I knew it had to be something I did. Pnpm's version is not putting the newest one in. I had not tried pnpm before and tried installing it.

grim heron
fast flare
#

Yea its my fault, I am happy to finally understand what is going on tho. Thanks so much for your help and patience!