Starter Project w/Knex Adapter Failing on Startup
See original GitHub issueBug 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/utils.cjs.dev.js:48:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
errors:
{ 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:
- Created 3 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top 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 >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
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 workingThis has been fixed in version
3.0.0
ofcreate-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.