Skip to content
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

TypeError: MySQL is not a constructor #32

Open
tiavina-mika opened this issue Feb 1, 2021 · 1 comment
Open

TypeError: MySQL is not a constructor #32

tiavina-mika opened this issue Feb 1, 2021 · 1 comment

Comments

@tiavina-mika
Copy link

tiavina-mika commented Feb 1, 2021

(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,
});`

@chderen
Copy link

chderen commented Sep 8, 2022

You should ignore the documentations, and remove the brackets

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants