When I upgraded to 6.5.0, I published the site and I am now getting the following error:
message
:
"Knex: run\n$ npm install mysql2 --save\nopen EEXIST"
stack
:
"Error: Knex: run\n$ npm install mysql2 --save\nopen EEXIST\n at Client_MySQL2.initializeDriver (/home/usofapag/nodevenv/nodejsapp/20/lib/node_modules/knex/lib/dialects/mysql2/index.js:33:13)\n at new Client (/home/usofapag/nodevenv/nodejsapp/20/lib/node_modules/knex/lib/client.js:83:12)\n at new Client_MySQL2 (/home/usofapag/nodevenv/nodejsapp/20/lib/node_modules/knex/lib/dialects/mysql2/index.js:9:1)\n at knex (/home/usofapag/nodevenv/nodejsapp/20/lib/node_modules/knex/lib/knex-builder/Knex.js:16:28)\n at App.setDbConnection (/home/usofapag/nodejsapp/lib/core/app.js:407:27)\n at App.getDbConnection (/home/usofapag/nodejsapp/lib/core/app.js:426:25)\n at App.paged (/home/usofapag/nodejsapp/lib/modules/dbconnector.js:406:25)\n at App._exec (/home/usofapag/nodejsapp/lib/core/app.js:611:57)\n at App._exec (/home/usofapag/nodejsapp/lib/core/app.js:578:28)\n at async App.exec (/home/usofapag/nodejsapp/lib/core/app.js:547:9)"
status
:
"500"
Any advice or suggestions on how to resolve this? I did try re-running NPM Install and it ran successfully without errors.
we are now using indeed the new driver for mysql called mysql2
check if it is in your package.json and it is uploaded. After that run indeed npm install on your live server to update it. Or on your control panel if you are using one
@George will have to verify this but it looks like if you edit your database connection in the Database Manager and in Globals you will see MySQL/MariaDB (Depreciated), so you need to click the list and select use MySQL/MariaDB and click Save. This will then install the new Node packages for you…
With OrangeHost, they created the nodevenv folder and and the entries within along with the link folder node_modules in the app root folder when the nodejs app is created within CPanel.
Oh yes, I restarted it multiple times, giggles.
I stopped the app, clicked on NPM install, got the green confirmation message saying installed with no errors, then started the app.
I deleted the nodejs app in CPanel, which removed all the entries in the nodevenv folder. I deleted the nodevenv folder and the created linked node_modules folder. Then deleted the nodejsapp folder. Then created the app from scratch as well.