5

I use nodejs and react.

I often get this error, sometimes this error message does not appear and sometimes also appears.

Error

return SafeBuffer.Buffer.from(json, 'utf8').toString('base64'); TypeError: Cannot read property 'from' of undefined

I don't know why this happened. but as far as I know, but when I restart or run a server it takes too long.can it affect? because I experienced the same thing on my mysql connection. therefore I get an older connectTimeOut like this:

import mysql from 'mysql';

var con = mysql.createConnection({
    host:'localhost',
    user:'root',
    password:'',
    database:'hammerst_hammer',
    multipleStatements: true,
    connectTimeout:30000
});

con.connect((err) =>{
    if(err) throw err;
    else console.log('MySql connected')
});

export default con; 

Please help me, I don't know which error and what to do

dev Faris
  • 113
  • 7

0 Answers0