Passed Getting Started › Quick start and got TypeError: keystone.createApolloServer is not a function
See original GitHub issueBug report
Describe the bug
Getting started for Keystone 5 ends up in errors, not in fun coding experience!!!
To Reproduce
Steps to reproduce the behaviour. Please provide code snippets or a repository:
- Go to https://www.keystonejs.com/quick-start/
- And try to pass the guide, use PostgreSQL as a database.
System information
- OS: macOS
- node v12.11.0
- npm 6.11.3
- yarn 1.22.4
Additional context
{
"name": "@keystonejs/example-projects-todo",
"description": "An example KeystoneJS project showcasing a simple Todo List with a Keystone StaticApp front-end.",
"private": true,
"version": "5.0.12",
"author": "The KeystoneJS Development Team",
"repository": "https://github.com/keystonejs/keystone/tree/master/packages/create-keystone-app/example-projects/todo",
"homepage": "https://github.com/keystonejs/keystone",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
},
"scripts": {
"dev": "cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev",
"build": "cross-env NODE_ENV=production keystone build",
"start": "cross-env NODE_ENV=production keystone start",
"create-tables": "cross-env keystone create-tables"
},
"dependencies": {
"@keystonejs/adapter-knex": "^11.0.1",
"@keystonejs/app-admin-ui": "^7.1.0",
"@keystonejs/app-graphql": "^6.0.0",
"@keystonejs/app-static": "^5.1.2",
"@keystonejs/fields": "^14.0.0",
"@keystonejs/keystone": "^12.0.0",
"cross-env": "^7.0.0"
}
}
Log output:
$ yarn dev
yarn run v1.22.4
$ cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev
ℹ Command: keystone dev
✔ Validated project entry file ./index.js
✔ Keystone server listening on port 3000
No cookieSecret value was provided. Please generate a secure value and add it to your app. Until this is done, a random cookieSecret will be generated each time Keystone is started. This will cause sessions to be reset between restarts. See [https://www.keystonejs.com/keystonejs/keystone/#cookiesecret] for details.
✔ Initialised Keystone instance
✖ Initialising Keystone instance
TypeError: keystone.createApolloServer is not a function
at GraphQLApp.prepareMiddleware (/Users/ignatev/Projects/mobile-cms-js/mobile-cms/node_modules/@keystonejs/app-graphql/index.js:28:29)
at /Users/ignatev/Projects/mobile-cms-js/mobile-cms/node_modules/@keystonejs/keystone/lib/Keystone/index.js:609:17
at Array.map (<anonymous>)
at Keystone._prepareMiddlewares (/Users/ignatev/Projects/mobile-cms-js/mobile-cms/node_modules/@keystonejs/keystone/lib/Keystone/index.js:608:12)
at Keystone.prepare (/Users/ignatev/Projects/mobile-cms-js/mobile-cms/node_modules/@keystonejs/keystone/lib/Keystone/index.js:626:36)
at executeDefaultServer (/Users/ignatev/Projects/mobile-cms-js/mobile-cms/node_modules/@keystonejs/keystone/bin/utils.js:149:42)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Thank you for any help resolving this issue!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Passed Getting Started › Quick start and got TypeError ...
Initialised Keystone instance ✖ Initialising Keystone instance TypeError: keystone.createApolloServer is not a function at GraphQLApp.
Read more >"keystone.getResolvers is not a function" after deleting yarn ...
This turned out to be an error with new package updates to KeystoneJS conflicting with my code. When I removed yarn.lock and ran...
Read more >Setting Up Authentication and Authorization with Apollo ...
To begin, we'll need to install some dependencies. Start by creating a directory for this project: mkdir apollo-federation-auth-demo && cd ...
Read more >Headless CMS & GraphQL API with KeystoneJS - YouTube
Build a GraphQL API using KeystoneJSCode:https://github.com/bradtraversy/ keystone -blogCode:https://github.com/bradtraversy/next-.
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
npm install --save @keystonejs/keystone^13.0.0
solves the issueHello, this fixed this issue for me. Hope this will help you. Go and update package.json and change the keystone version from 12.0.0 to 13.0.0 as this image