Skip to content

When using sequelize, npm run start:server reports a promise was passed to a then #2751

Closed
@zeripath

Description

@zeripath
  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack v5.0.0-rc.2
Node v10.7.0
npm 6.1.0
Operating System Ubuntu 18.04 LTS
Item Answer
Transpiler Typescript
Markup Pug
CSS SCSS
Router ngRoute
Client Tests Mocha
DB SQL
Auth Y

When using sequelize, npm run start:server reports:

(node:xxxxxx) Warning: .then() only accepts functions but was passed: [object Promise]

this happens because in server/app.js

sqldb.sequelize.sync()
    .then(wsInitPromise)

is incorrect and should be:

sqldb.sequelize.sync()
    .then(() => wsInitPromise)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions