I wonder difference to main, function environment nodejs 14.x mysql2 2.2.3 I made code, call pool.getconnection in main, it’s fine(success data from db) but can’t get a data from function. I wonder why this can’t get from function can’t find error log only find Promise pending.. Promise { } Answer The getConnection method does not return a Promise, you should
Tag: node-mysql2
im trying to insert data to mysql from puppeteer (async) but I getting “connection.query is not a function”
I just want to store the data I collected in the database but I getting “connection.query is not a function” I’ve checked a lot of options to solve the issue and I can not find anything that works. In some of the ways the variables I collected were null and in the other part the connection.query was not a function