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
Project ID:
N/A
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
here
ya
seems like linting issues
typescript is having a bad day in your project
you'd either need to fix the warnings or you can set
CI
to false if you don't want to fix your linting issuesI guided him in setting CI=false but it didn't work
oh
yea guess they'll need to fix it then
it really is just linting issues?
this issues?
yes
it works but
are reapeting this issues on the deploy terminal
Its another error now, seems like CORS to me
mind sending full logs again?
sure
sorry
i think it is the sequelize
i need to put the storage
nah, cors don't give system level errors
econrefused is usually caused by invalid port or hostname
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
im using sequelize
and have to migrate
like
npx sequelize-cli db:migrate
where is your database located?
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?
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 )there we go
create a new service right next to the one already existing
database and volume are the same?
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
okay
created
next i have to conect on my project
?
ya
you can get the connection string through this:
and the rest is things you need to change in your code
i put the database_url
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
ok i will trade
thanks!!
Happy to help 🙂
and what about the migrations?
it is auto?
You want to migrate data from somewhere?
no
it its to create the tables
the configs i ve made on the sequelize
idk, I don't use SQL
bonjour
who said sql?
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 initializeokay
true I remember now thank you
i don't know how that works in sequelize, but this is how i do in prisma
*and yes, sleep 10 is a little overkill but it works for me
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
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
yes, migrations adds a table to your database with migration history, it doesn't execute the migrations it had already ran