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: self.knex.schema.hasTable is not function #83

Open
patelanand553 opened this issue Jul 22, 2021 · 0 comments
Open

TypeError: self.knex.schema.hasTable is not function #83

patelanand553 opened this issue Jul 22, 2021 · 0 comments

Comments

@patelanand553
Copy link

patelanand553 commented Jul 22, 2021

✖ Initialising Keystone instance
TypeError: self.knex.schema.hasTable is not a function
at new KnexStore (E:\projects\blogging\node_modules\connect-session-knex\lib\index.js:106:8)

```

const { KnexAdapter: Adapter } = require('@keystonejs/adapter-knex');
const adapterConfig = { knexOptions: { connection: process.env.DATABASE_URL }, /*dropDatabase: true/ };
const session = require('express-session');
const KnexSessionStore = require('connect-session-knex')(session);

const knex = new Adapter(adapterConfig);

const sessionsStore = new KnexSessionStore({
knex,
tablename: "sessions"
});

const keystone = new Keystone({
adapter: knex,
sessionStore: sessionsStore
});

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

1 participant