R
Railway•5mo ago
Luis Kurihara

Error Build

Trying to this build but have this error, im tested on vscode using 'npm run dev', 'npm run build' and 'npm start', works great
53 Replies
Percy
Percy•5mo ago
Project ID: N/A
Luis Kurihara
Luis Kurihara•5mo ago
No description
Fragly
Fragly•5mo ago
Mind using this to send full logs? https://bookmarklets.up.railway.app/log-downloader/ from what I can tell so far- seems like linting errors
Luis Kurihara
Luis Kurihara•5mo ago
here
Fragly
Fragly•5mo ago
ya seems like linting issues
maddsua
maddsua•5mo ago
typescript is having a bad day in your project
Fragly
Fragly•5mo ago
you'd either need to fix the warnings or you can set CI to false if you don't want to fix your linting issues
Medim
Medim•5mo ago
I guided him in setting CI=false but it didn't work
Fragly
Fragly•5mo ago
oh yea guess they'll need to fix it then
Medim
Medim•5mo ago
it really is just linting issues?
Luis Kurihara
Luis Kurihara•5mo ago
No description
Luis Kurihara
Luis Kurihara•5mo ago
this issues?
Fragly
Fragly•5mo ago
yes
Luis Kurihara
Luis Kurihara•5mo ago
it works but are reapeting this issues on the deploy terminal
Medim
Medim•5mo ago
Its another error now, seems like CORS to me
Luis Kurihara
Luis Kurihara•5mo ago
No description
Fragly
Fragly•5mo ago
mind sending full logs again?
Luis Kurihara
Luis Kurihara•5mo ago
sure sorry
Luis Kurihara
Luis Kurihara•5mo ago
i think it is the sequelize i need to put the storage
maddsua
maddsua•5mo ago
nah, cors don't give system level errors econrefused is usually caused by invalid port or hostname
Fragly
Fragly•5mo ago
Seems to me like you're trying to have your service connect to itself (on the wrong port) to reach some kind of postgres database
Luis Kurihara
Luis Kurihara•5mo ago
im using sequelize and have to migrate like npx sequelize-cli db:migrate
Fragly
Fragly•5mo ago
where is your database located?
Luis Kurihara
Luis Kurihara•5mo ago
I didn't create That's why I asked you on the general channel how the database issue worked How can I create the database with all these settings?
Fragly
Fragly•5mo ago
You'd want to create a new database on Railway you can do this by rightclicking in your project, Clicking on "Database" and adding the database you want to add you can then connect to that database through the connection string it provides in the Variables tab ( optimially, you'd create a reference variable pointing to the variable containing the connection string, and use that service variable to connect to it )
maddsua
maddsua•5mo ago
there we go create a new service right next to the one already existing
Luis Kurihara
Luis Kurihara•5mo ago
database and volume are the same?
Luis Kurihara
Luis Kurihara•5mo ago
No description
Fragly
Fragly•5mo ago
a volume on database is just a place to store files persistently databases use volumes to function, but they're not the same right click next to your service instead of on your service to get Database options
maddsua
maddsua•5mo ago
No description
maddsua
maddsua•5mo ago
No description
Luis Kurihara
Luis Kurihara•5mo ago
okay created next i have to conect on my project ?
Fragly
Fragly•5mo ago
ya
Fragly
Fragly•5mo ago
you can get the connection string through this:
No description
Fragly
Fragly•5mo ago
and the rest is things you need to change in your code
Luis Kurihara
Luis Kurihara•5mo ago
i put the database_url
Fragly
Fragly•5mo ago
Best practice would be to use the private url instead of the public one the private one routes through the private network which doesn't count towards egress usage but either will work
Luis Kurihara
Luis Kurihara•5mo ago
ok i will trade thanks!!
Fragly
Fragly•5mo ago
Happy to help 🙂
Luis Kurihara
Luis Kurihara•5mo ago
and what about the migrations? it is auto?
Fragly
Fragly•5mo ago
You want to migrate data from somewhere?
Luis Kurihara
Luis Kurihara•5mo ago
no it its to create the tables the configs i ve made on the sequelize
Fragly
Fragly•5mo ago
idk, I don't use SQL
maddsua
maddsua•5mo ago
bonjour who said sql?
ThallesComH
ThallesComH•5mo ago
you've a command to run the migrations, right? just add it in the start command, something like this run-migrations && start and also, make sure to delay your app initialization a little bit as private networking takes sometime to initialize
Luis Kurihara
Luis Kurihara•5mo ago
okay true I remember now thank you
ThallesComH
ThallesComH•5mo ago
i don't know how that works in sequelize, but this is how i do in prisma
No description
ThallesComH
ThallesComH•5mo ago
*and yes, sleep 10 is a little overkill but it works for me
Luis Kurihara
Luis Kurihara•5mo ago
but every deploy you migrate? Ah, but it will give that answer that already exists, right? PS C:\Users\kurih\Documents\spyleiloes_back_end> npx sequelize-cli db:migrate
Sequelize CLI [Node: 18.16.1, CLI: 6.4.1, ORM: 6.35.2] Loaded configuration file "src\config\sequelizeCli.js". Using environment "production". No migrations were executed, database schema was already up to date. likes this
ThallesComH
ThallesComH•5mo ago
yes, migrations adds a table to your database with migration history, it doesn't execute the migrations it had already ran
Want results from more Discord servers?
Add your server
More Posts