at require (internal/module.js:11:18)
at Object.<anonymous> (/app/src/keystone.js:4:18)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
2019-12-24T13:48:47: PM2 log: App name:some-app id:0 disconnected
2019-12-24T13:48:47: PM2 log: App [some-app:0] exited with code [0] via signal [SIGINT]
2019-12-24T13:48:47: PM2 log: App [some-app:0] starting in -cluster mode-
2019-12-24T13:48:47: PM2 log: App [some-app:0] online
SyntaxError: Error parsing /app/node_modules/keystone/package.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at readPackage (module.js:126:52)
at tryPackage (module.js:136:13)
at Function.Module._findPath (module.js:218:20)
at Function.Module._resolveFilename (module.js:546:25)
at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:51:29)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/src/keystone.js:4:18)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
2019-12-24T13:48:47: PM2 log: App name:some-app id:0 disconnected
2019-12-24T13:48:47: PM2 log: App [some-app:0] exited with code [0] via signal [SIGINT]
2019-12-24T13:48:47: PM2 log: Script /app/src/keystone.js had too many unstable restarts (16). Stopped. “errored”
2019-12-24T13:48:50: PM2 log: 0 application online, retry = 3
2019-12-24T13:48:52: PM2 log: 0 application online, retry = 2
2019-12-24T13:48:54: PM2 log: 0 application online, retry = 1
2019-12-24T13:48:56: PM2 log: 0 application online, retry = 0
2019-12-24T13:48:56: PM2 log: [Watch] Stop watching some-app
2019-12-24T13:48:56: PM2 log: Stopping app:some-app id:0
2019-12-24T13:48:56: PM2 error: app=some-app id=0 does not have a pid
2019-12-24T13:48:56: PM2 log: PM2 successfully stopped
Hi I am using KeyStone 5. I want to debug my index.js file that loads keystone in AWS Cloud9 ide. I have tried everything:
cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev --inspect
and
cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev --debug--brk
and neither seem to work. I want to step into my own code to debug it
members: {
type: Relationship,
ref: "Member.department",
many: true
}
department: {
type: Relationship,
ref: "Department.members"
}
members: {
type: Relationship,
ref: "Member",
many: true
}
department: {
type: Relationship,
ref: "Department"
}
Does anyone have any recommendations on setting up sessionStore
in production using Postgres as a store? I'm trying to deploy on Heroku and I can't find any up to date (KeystoneJS v5) recommendations on this.
The farthest I've got---after trying several approaches---is to use connect-session-sequelize
, but I get:
SequelizeDatabaseError: relation "Session" does not exist
The documentation for connect-session-sequelize
mentions:
If you want SequelizeStore to create/sync the database table for you, you can call sync() against an instance of
SequelizeStore
But I'm not sure where I'd be able to do that within my KeystoneJS code.
http://localhost:3000/admin
relation "public.user" does not exist
const users = {
adapterConfig: {
tableName: 'users'
},
fields: {
email: {
type: Text
},
},
};
keystone.createList('user', users)
Cannot read property 'find' of undefined
Hi team, I tried to create the todo app using the npm init keystone-app my-app and selected postgresl… Getting the issue Connecting to database
{ Error: Cannot read property 'find' of undefined… So modified the index.js with const PROJECT_NAME = "keystonetodo";
const options={
client: 'postgres',
connection: 'postgres://postgres:psssword@localhost:5432/keystonetodo'
}
const keystone = new Keystone({
name: PROJECT_NAME,
adapter: new Adapter(options),
}); and when i run npm run dev and still getting the issue
I'm trying to add custom pages to my PoC and I have the following code:
new AdminUIApp({
name: PROJECT_NAME,
enableDefaultRoute: true,
authStrategy,
pages: require.resolve('./admin/pages.js')
}),
export default {
pages: () => [
{
label: 'Insights',
children: [
{ listKey: 'article' },
{ listKey: 'articleCategory', label: 'Categories' },
],
},
]
};