-
-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require('mysql2') breaks "npm start" #1965
Comments
Are you able to upgrade node version? node v12 is currently one year past its end of life. |
@sidorares you might want to update https://github.com/sidorares/node-mysql2/blob/master/package.json#L54 to say In the future, it might also be nice to point out dropping support for Node.js versions as a breaking change in the changelog. Of course, one might find it debatable whether such a warning is necessary for EOL versions of Node.js. |
Faced similar error on my end. In the end, I've upgraded my node version and it works. |
this work fine on the backend , but at cpanel where i have following node version
and i ahve tried mysql2 veriosn 3.2.0, 3.2.1 3.3.0, 3.4.0 , but non of the above is working . |
Use terminal:
|
If i add to my project
const mysql = require('mysql2');
and launch my nodejs project with
npm start
i get error
Setup:
OS: Ubuntu 22.04.1 LTS
Nodejs: v12.22.9
mysql2: mysql2@3.2.3
This problem seems to start from verstion mysql2@3.2.1.
mysql2@3.2.0 is ok.
The text was updated successfully, but these errors were encountered: