parse-server-mysql-adapter icon indicating copy to clipboard operation
parse-server-mysql-adapter copied to clipboard

TypeError: MySQL is not a constructor

Open tiavina-mika opened this issue 4 years ago • 1 comments

(node:18776) UnhandledPromiseRejectionWarning: TypeError: MySQL is not a constructor

I've got this error.

here is my code `const { MySQL } = require('parse-server-mysql-adapter');

const mysql = new MySQL(DB_URI);

const parseServerAPI = new ParseServer({ databaseURI: mysql.getAdapter(), cloud: path.resolve(__dirname, 'server/cloud/main.ts'), appId: APP_ID, masterKey: MASTER_KEY, serverURL: SERVER_URL, appName: APP_NAME, });`

tiavina-mika avatar Feb 01 '21 14:02 tiavina-mika

You should ignore the documentations, and remove the brackets

const MySQL = require('parse-server-mysql-adapter');

chderen avatar Sep 08 '22 12:09 chderen