node-mysql2
node-mysql2 copied to clipboard
Working Fine on Localhost But crash on Cpanel
when i import this statment on the app.js my app crash.
const mysql = require('mysql2');
the Package.json
{
"name": "testApp",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node ./app.js",
"start:dev": "nodemon ./app.js"
},
"dependencies": {
"axios": "^1.4.0",
"body-parser": "^1.19.0",
"cookie-parser": "~1.4.4",
"express": "^4.17.1",
"joi": "^17.2.1",
"moment": "^2.29.4",
"morgan": "~1.9.1",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.4.0",
"node-cron": "^3.0.2",
"nodemailer": "^6.4.11",
"rootpath": "^0.1.2",
"sequelize": "^6.28.0",
"sequelize-auto": "^0.8.8"
}
}
i also try const mysql = require("mysql2/promise"); not working
can you give a bit more details about the crash? Do you see any error message? Can you paste the stack trace?
The application process exited prematurely.
App 575050 output: at Object.
might be related to #1965 or #1885 but would help to see the full stack ( and error message itself for the original error ) "The application process exited prematurely." is likely coming from some top level handler for process exit event