Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Starter Project w/Knex Adapter Failing on Startup

See original GitHub issue

Bug report

Describe the bug

I followed the quick start guide. I wanted to create the β€œStarter (Users + Authentication)” type of app with the PostgreSQL database. Below is an output from my terminal of what I did (PLEASE NOTE: I had already created the database on a previous try that ended in the exact same error).

To Reproduce

ο…Ή  ~/Projects ❯ yarn create keystone-app school-dispatch                                                                                                                                      ο‰’ 4s
yarn create v1.22.4
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
success Installed "create-keystone-app@1.7.0" with binaries:
      - create-keystone-app
[############################################################] 60/60

 ╦╔═ ╔═╗ ╦ ╦ ╔═╗ ╔╦╗ ╔═╗ β•”β•—β•” ╔═╗  ╦ ╔═╗
 β• β•©β•— β•‘β•£  β•šβ•¦β• β•šβ•β•—  β•‘  β•‘ β•‘ β•‘β•‘β•‘ β•‘β•£   β•‘ β•šβ•β•—
 β•© β•© β•šβ•β•  β•©  β•šβ•β•  β•©  β•šβ•β• β•β•šβ• β•šβ•β• β•šβ• β•šβ•β•

Answer a few questions and we'll generate a starter project for you.

βœ” What is your project name? … School Dispatch
βœ” Select a starter project β€Ί Starter (Users + Authentication)
βœ” Select an adapter β€Ί Knex
βœ” Copying project files
Installing dependencies with yarn. This could take a few minutes.
βœ” Installed dependencies

  πŸŽ‰  KeystoneJS created a starter project in: school-dispatch

  To launch your app, run:

  - cd school-dispatch
  - yarn dev

  Next steps:

  - View your app
  - Edit school-dispatch/index.js to customize your app.
  - Open the Admin UI
  - Read the docs
  - Star KeystoneJS on GitHub

✨  Done in 48.18s.
ο…Ή  ~/Projects ❯ cd school-dispatch                                                                                                                                                           ο‰’ 48s
ο…Ή  ~/Projects/school-dispatch ❯ 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
βœ” Initialised Keystone instance
βœ– Connecting to database
{ Error: Cannot read property 'find' of undefined
    at Promise.all.then.results (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/utils/dist/
    at process._tickCallback (internal/process/next_tick.js:68:7)
   { KnexAdapter:
      TypeError: Cannot read property 'find' of undefined
          at fieldAdapters.forEach.fieldAdapter (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/adapter-knex/lib/adapter-knex.js:258:31)
          at Array.forEach (<anonymous>)
          at KnexListAdapter._postConnect (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/adapter-knex/lib/adapter-knex.js:257:24)
          at Object.values.forEach.listAdapter (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/adapter-knex/lib/adapter-knex.js:73:19)
          at Array.forEach (<anonymous>)
          at KnexAdapter.postConnect (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/adapter-knex/lib/adapter-knex.js:72:38)
          at KnexAdapter.connect (/Users/caleb/Projects/school-dispatch/node_modules/@keystonejs/adapter-knex/node_modules/@keystonejs/keystone/lib/adapters/index.js:29:38)
          at process._tickCallback (internal/process/next_tick.js:68:7) } }
error Command failed with exit code 1.

Expected behaviour

I expected to be able to start up my demo project.

System information

  • OS: macOS (10.14.6)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

wini16commented, Mar 26, 2020

Hey @wcalebgray Had the same issue. It looks like a problem with version mismatch between @keystonejs/keystone and @keystonejs/adapter-knex I noticed that I had those in package.json: "@keystonejs/adapter-knex": "^7.0.0", "@keystonejs/keystone": "^6.0.1", after upgrade to: "@keystonejs/adapter-knex": "^7.0.0", "@keystonejs/keystone": "^7.0.0", keystone started working

timlesliecommented, Apr 8, 2020

This has been fixed in version 3.0.0 of create-keystone-app. Please try running the script at this new version and by all means re-open this ticket if you find the same/similar issues with the latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wireless adapter disabled at start up - Microsoft Community
Right click the network icon in System Tray at bottom right end of task bar to Troubleshoot Problems. Try powering off modem, router...
Read more >
6.2 Troubleshooting Adapter Startup Errors
To identify the cause of a startup failure, navigate to the adapters/log directory in the CASD Adapter installation directory and open the framework.logΒ ......
Read more >
"failed to launch debug adapter" when trying to run .net core ...
Steps to reproduce: 1. Run a new .NET Core web app on debug (not IIS option) 2. Open the website on a second...
Read more >
Fix This Device Cannot Start. (code 10) Error With WiFi ...
Learn to fix This device cannot start Code 10 error with wireless adapter or any other driver on Windows 10 or 11 computers....
Read more >
Network Adapter Not Working? 12 Things to Try
Right-click the Start button. Open Device Manager. With Device Manager open, look for the network adapters category and expand it by selectingΒ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found