parse-server-mysql-adapter
parse-server-mysql-adapter copied to clipboard
TypeError: MySQL is not a constructor
(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, });`
You should ignore the documentations, and remove the brackets
const MySQL = require('parse-server-mysql-adapter');