KSDaemon/sails-hook-sequelize

Dialect needs to be explicitly supplied as of v4.0.0

clonn opened this issue · 4 comments

clonn commented

shows error below,

error: A hook (`sequelize`) failed to load!
verbose: Lowering sails...
verbose: Shutting down HTTP server...
verbose: HTTP server shut down successfully.
error: Error: Dialect needs to be explicitly supplied as of v4.0.0
    at new Sequelize

But when i downgrade to npm i sails-hook-sequelize@1.0.1, it works fine.

Hi @clonn! Well... Thats because sequelize version was updated to v4 :)
So, all what you need to do — is just specify dialect in your model options

clonn commented

Understand, maybe we have to upgrade to sequelize 4.x.x, thanks for your answer.
I think this issue can be closed.

I recently came across this issue as well. I discovered the major version update of Sequelize in my lock file. Shouldn't the major version of sails-hook-sequelize have been bumped to 2.0.0 if it exposes a breaking change to the client?

@stevehansell Well... Tricky question... Because as of semver — hook public api is not changed, sequelize itself is a private dependency, so there is no need to increase major version. But in your project you can use sequelize directly, but installing hook will update installed version....