Skip to main content

All Questions

Tagged with
0 votes
1 answer
32 views

ORM Sequelize model.upsert() is not a function

Version sequelize 6.37.3 I try to upsert() myModel but the mehtod returns: TypeError: model.upsert is not a function my_model.controller.ts ... class MyModelController { private model: any; ....
rammi22's user avatar
  • 395
0 votes
0 answers
17 views

While running server.js in kubernetes pods getting errors connect ETIMEDOUT

Error connecting to the database server: Error: connect ETIMEDOUT at Connection._handleTimeoutError (/usr/src/app/node_modules/mysql2/lib/connection.js:205:17) at listOnTimeout (internal/timers.js:557:...
Pranay Masurkar's user avatar
-1 votes
0 answers
18 views

GET http://127.0.0.1:3001/search/3 404 (Not Found) error for retreiveing a record from a database

I am trying to create a web app to retrieve records from a mysql database but it seems i keep getting the 404 not found error. I am suing node.js for server side, and it seems that my endpoints are ...
ZhNgR's user avatar
  • 29
-1 votes
0 answers
18 views

How to fix 'ER_FK_CANNOT_DROP_PARENT' error, 'ER_NO_SUCH_TABLE', 'ER_BAD_FIELD_ERROR' in Sequelize for MySQL? [duplicate]

When I run my server.js file I get the error mentioned in title.Also I get null violation errors when trying to insert into the TreeSeeds table. There is a foreign key called seedcompany_id in the ...
RendezYT's user avatar
0 votes
1 answer
32 views

How to get Sequelize to recognize by primary key with MySQL database data set and fix bulkCreate() issue?

So I have a database where I am trying to establish a one-to-many relationship between Supplier and TreeSeed, whereby one Supplier can sell many TreeSeed. I have looked at the sequelize documentation ...
RendezYT's user avatar
0 votes
1 answer
54 views

How to get Sequelize to recognize my custom foreign key and primary keys in a one-to-many relationship in MySQL during bulkcreate insert?

I am building a plant/arboretum style application in JavaScript. I am trying to create a one-to-many relationship between Supplier model and TreeSeed model. Meaning that one supplier can sell multiple ...
RendezYT's user avatar
0 votes
0 answers
25 views

await is only valid in async functions and the top level bodies of modules nodejs [duplicate]

Basically using Nodejs I connect to mysql and create a pool using below code which works fine, db.js const mysql = require("mysql") exports.database = mysql.createPool({ host: "...
micronyks's user avatar
  • 55.1k
0 votes
0 answers
20 views

Mysql rows transposing in Node.js with mysql2 [duplicate]

I am running an SQL script in Node.js using mysql2 npm-package. This script has multiple SQL statements that have to ultimately transpose a table's rows into columns. The SQL script runs correctly ...
john k.w's user avatar
-1 votes
2 answers
84 views

MySQL insert query successful but not inserting into database table

I am working on a React/MySQL registration page. The insert query runs, but is not inserting into the database table. I am not sure why. In the backend folder, I have my server.js file: const ...
John Beasley's user avatar
  • 2,853
0 votes
0 answers
19 views

Backend container connection issue to production database container in docker

I'm trying to link 3 containers run by Docker to a production stage. The first container is hosting a vuejs 3 application and runs smoothly. The issue arrives when I use the command : sudo docker ...
RemHD's user avatar
  • 11
0 votes
1 answer
32 views

Sequelize code first with mysql cannot generate database

I am facing an issue related to sequelize when generating the database by commandline npx sequelize-cli db:migrate The firsting I installing my sql and using MySQL Workbench to connect it -> ...
hhpr98's user avatar
  • 65
0 votes
0 answers
43 views

How to upsert data in mysql in NodeJS

I'm using MySQL for the first time through a NodeJS application. I'm managing to insert into a table, but I'm attempting to adapt my code to upsert the data instead, if a value matches. I've been ...
SosijElizabeth's user avatar
0 votes
0 answers
22 views

How to Efficiently Handle Real-Time Forex Data Updates and Database Synchronization in Node.js?

I'm developing a Forex trading application using Node.js, where I need to handle real-time updates for around 600 currency pairs. The data comes from a FIX protocol engine and needs to be updated in ...
TechnoDeveloper's user avatar
-2 votes
0 answers
15 views

Error in node.js with Mysql after a few hours [duplicate]

I'm new to node js, I built a server that uses mysql for the database, and after a few hours of running the server, an error appears and a crash occurs. I wanted to see if anyone could see something ...
Ehsan Ahadi's user avatar
0 votes
1 answer
70 views

TypeError: pool.promise is not a function

I am using mysql2 library for connecting to database. const pool = mysql.createPool({ connectionLimit: process.env.DB_CONNECTION_LIMIT, host: process.env.DB_HOST, user: process.env.DB_USER, ...
Rajat Aggarwal's user avatar

15 30 50 per page
1
2 3 4 5
796