R
Railway•16mo ago
reimakesgames

some error that i don't know how to explain

yeah
70 Replies
Percy
Percy•16mo ago
Project ID: 6702f829-1168-47a1-a335-c0167d00dc21
reimakesgames
reimakesgamesOP•16mo ago
6702f829-1168-47a1-a335-c0167d00dc21
Brody
Brody•16mo ago
nodejs right?
reimakesgames
reimakesgamesOP•16mo ago
attempting to connect to PostgreSQL server on my local host server causes this to happen
reimakesgames
reimakesgamesOP•16mo ago
reimakesgames
reimakesgamesOP•16mo ago
yes it's nodejs
Brody
Brody•16mo ago
what package are you using to connect?
reimakesgames
reimakesgamesOP•16mo ago
ts-postgres
Brody
Brody•16mo ago
can you show me the new Client() code?
reimakesgames
reimakesgamesOP•16mo ago
Brody
Brody•16mo ago
and how are those variables getting set?
reimakesgames
reimakesgamesOP•16mo ago
what do you mean
Brody
Brody•16mo ago
like with an .env file or through railway run
reimakesgames
reimakesgamesOP•16mo ago
.env file
Brody
Brody•16mo ago
are you loading the .env file
reimakesgames
reimakesgamesOP•16mo ago
if i console.log those variables, they're there exactly correctly
Brody
Brody•16mo ago
remove keepalive?
reimakesgames
reimakesgamesOP•16mo ago
i don't know i console.log the process.env variables, they're there with or without it doesn't work same error
Brody
Brody•16mo ago
do you have client.end() anywhere
reimakesgames
reimakesgamesOP•16mo ago
yes doesn't affect anything
Brody
Brody•16mo ago
youve tried removing it?
reimakesgames
reimakesgamesOP•16mo ago
it just stops if i have line 11
reimakesgames
reimakesgamesOP•16mo ago
it shits itself when i have client.connect() if i remove it it works perfectly fine
Brody
Brody•16mo ago
well if you remove the connect its not gonna connect lol
reimakesgames
reimakesgamesOP•16mo ago
...yeah
Brody
Brody•16mo ago
have you tried a different package?
reimakesgames
reimakesgamesOP•16mo ago
no i don't want to use other packages
Brody
Brody•16mo ago
just as a little test
reimakesgames
reimakesgamesOP•16mo ago
reimakesgames
reimakesgamesOP•16mo ago
maybe railway is saying "FUCK YOU" to my connection attempts
Brody
Brody•16mo ago
have you tried with dbgate?
reimakesgames
reimakesgamesOP•16mo ago
no
Brody
Brody•16mo ago
can you please?
reimakesgames
reimakesgamesOP•16mo ago
i know it's this
reimakesgames
reimakesgamesOP•16mo ago
fuck thsi im using redis i don't know anymore it's been 4 hours
Brody
Brody•16mo ago
ts-postgres just might be incompatible with the version of postgres railway runs
reimakesgames
reimakesgamesOP•16mo ago
i haven't made any feature yet
Brody
Brody•16mo ago
just try connecting with dbgate please
reimakesgames
reimakesgamesOP•16mo ago
fine im gonna download dbgate
Brody
Brody•16mo ago
thanks 🙂
reimakesgames
reimakesgamesOP•16mo ago
reimakesgames
reimakesgamesOP•16mo ago
what now
Brody
Brody•16mo ago
connection worked?
reimakesgames
reimakesgamesOP•16mo ago
obviously what now
Brody
Brody•16mo ago
use a different postgres client package
reimakesgames
reimakesgamesOP•16mo ago
ew javascript
Brody
Brody•16mo ago
im sure there are many ts clients
reimakesgames
reimakesgamesOP•16mo ago
no only one
Brody
Brody•16mo ago
well the "only one" doesnt seem to work
reimakesgames
reimakesgamesOP•16mo ago
congrats
Brody
Brody•16mo ago
ah the joys of js/ts development
fad
fad•16mo ago
You probably don't want to use that package anyway. The popular option is pg not postgres Try npm install --save pg @types/pg
Brody
Brody•16mo ago
oh yeah fad is right pg is the way to go
reimakesgames
reimakesgamesOP•16mo ago
yippee
Brody
Brody•16mo ago
ayy thats awsome, thanks fad!
reimakesgames
reimakesgamesOP•16mo ago
where is the docs im blind
reimakesgames
reimakesgamesOP•16mo ago
yippee
Brody
Brody•16mo ago
pain
reimakesgames
reimakesgamesOP•16mo ago
reimakesgames
reimakesgamesOP•16mo ago
part of docs too !!! bullshit
fad
fad•16mo ago
I think you're importing the class the wrong way
reimakesgames
reimakesgamesOP•16mo ago
the wrong way?
reimakesgames
reimakesgamesOP•16mo ago
fad
fad•16mo ago
You don't have to type the full path to the module. Just type the module name. Oh nevermind then
reimakesgames
reimakesgamesOP•16mo ago
im going back to postgres this is just ridiculous
fad
fad•16mo ago
It seems really weird that the error message shows the full path to the module.
reimakesgames
reimakesgamesOP•16mo ago
im just gonna mute this error
reimakesgames
reimakesgamesOP•16mo ago
no quick fixes available its finished
fad
fad•16mo ago
Honestly from my point of view your issue is more of a transpiler config issue.
reimakesgames
reimakesgamesOP•16mo ago
done im off to finish my very useful website that i didn't just waste 3 hours trying to fix something so ridiculous as this
Want results from more Discord servers?
Add your server