Skip to content

Cannot read property 'getQueryInterface' of undefined #10

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

Closed
pronitdas opened this issue Jul 14, 2020 · 5 comments
Closed

Cannot read property 'getQueryInterface' of undefined #10

pronitdas opened this issue Jul 14, 2020 · 5 comments

Comments

@pronitdas
Copy link

ts-node version 8.3.0
typescript version 3.8.3
node nersion 14.4.0
sequelize version 6.2.4
sequelize-typescript version 1.1.0

`/home/pronit/.nvm/versions/node/v14.3.0/lib/node_modules/sequelize/lib/model.js:55
return this.sequelize.getQueryInterface();
^

TypeError: Cannot read property 'getQueryInterface' of undefined
at Function.get queryInterface [as queryInterface] (/home/pronit/.nvm/versions/node/v14.3.0/lib/node_modules/sequelize/lib/model.js:55:27)
at isFunctionMember (/home/pronit/.nvm/versions/node/v14.3.0/lib/node_modules/sequelize-typescript/dist/model/model/model.js:99:25)
at /home/pronit/.nvm/versions/node/v14.3.0/lib/node_modules/sequelize-typescript/dist/model/model/model.js:96:5
at Array.filter ()
at Object. (/home/pronit/.nvm/versions/node/v14.3.0/lib/node_modules/sequelize-typescript/dist/model/model/model.js:95:6)
`

@spinlud
Copy link
Owner

spinlud commented Jul 14, 2020

Hi @pronitdas, at the moment only sequelize 5.x.x is supported. I am waiting for sequelize-typescript to be fully compatible with sequelize 6.x.x, see sequelize/sequelize-typescript#785. Once ready I will try to make this library compatible with version 6 as well.

@pronitdas
Copy link
Author

sequelize/sequelize-typescript#807

they did upgrade to v6.1.1. Let me know if i could help in upgrading.

@spinlud
Copy link
Owner

spinlud commented Jul 16, 2020

Thanks for the update, but I am afraid they are still in beta for v6 compatibility. I'll wait a stable npm release before to start working on an upgrade

@robpearmain
Copy link

I have worked around this by changing my package.json entry to:

"sequelize": "5.22.3",

Then nom install

@spinlud
Copy link
Owner

spinlud commented Jan 18, 2021

Sequelize v6.3.5 supported now.

@spinlud spinlud closed this as completed Jan 18, 2021
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

3 participants