when i tried to add certain fields like wysiwyg field, i got keystone unable to boot.
Steps to reproduce the behaviour. Please provide code snippets or a repository
example:
const { Wysiwyg } = require('@keystonejs/fields-wysiwyg-tinymce');
exports.Todo = {
schemaDoc: 'A list of things which need to be done',
fields: {
name: { type: Text, schemaDoc: 'This is the thing you need to do', required: true },
description: { type: Wysiwyg, schemaDoc: 'Task description here', editorConfig: {} },
},
adminConfig: {
defaultPageSize: 20,
}
}
keystone to start
✖ Initialising Keystone instance
GraphQLError: Syntax Error: Expected :, found (
at syntaxError (/mnt/c/james/www/project/node_modules/graphql/error/syntaxError.js:15:10)
at Parser.expectToken (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:1404:40)
at Parser.parseInputValueDef (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:890:10)
at Parser.optionalMany (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:1497:28)
at Parser.parseInputFieldsDefinition (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:1052:17)
at Parser.parseInputObjectTypeDefinition (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:1036:23)
at Parser.parseTypeSystemDefinition (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:708:23)
at Parser.parseDefinition (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:146:23)
at Parser.many (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:1518:26)
at Parser.parseDocument (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:111:25)
at parse (/mnt/c/james/www/project/node_modules/graphql/language/parser.js:36:17)
at parseDocument (/mnt/c/james/www/project/node_modules/graphql-tag/lib/graphql-tag.umd.js:135:16)
at gql (/mnt/c/james/www/project/node_modules/graphql-tag/lib/graphql-tag.umd.js:176:10)
at /mnt/c/james/www/project/node_modules/@keystonejs/keystone/lib/Keystone/index.js:534:17
at Array.map (
at Keystone.getTypeDefs (/mnt/c/james/www/project/node_modules/@keystonejs/keystone/lib/Keystone/index.js:534:8) {
locations: [ { line: 5, column: 21 } ]
}
yarn add @keystonejs/[email protected]
found this in the graphsql check:
input TodoUpdateInput {
name: String
started: Boolean
gqlUpdateInputFields() {
return [`${this.path}: String`];
}
}
✖ Initialising Keystone instance
GraphQLError: Syntax Error: Expected :, found (
iam already using "@keystonejs/fields-wysiwyg-tinymce": "^5.3.6",
@caesarisme thank you :) it works now
Most helpful comment
yarn add @keystonejs/[email protected]