Cannot boot in existing project: "TypeError: Cannot read property 'prepare' of undefined"
See original GitHub issueThis is a two-part issue. The first was when – in an almost two month old project – I attempted to add some additional relationships, writing the additional Lists and putting the correct Relationship fields into one of my Lists. At that point that List into which I added the new relationships could not see any of the relationships it had – neither the new ones, nor the old ones, even after I edited the file and removed all new code. I had to download from the repo to solve the problem.
I tried it again with the newly downloaded repo, step by step, just adding one file to the project. At the point it blew up again – an existing relationship_ no longer worked, even though I hadn’t added any new ones, just added one file.
I deleted the new file and attempted to boot and now I am getting
✔ Initialised Keystone instance
✖ Connecting to database
TypeError: Cannot read property 'prepare' of undefined
at executeDefaultServer (/Users/ranthony/Documents/projects/yaa-cms2/node_modules/@keystonejs/keystone/bin/utils.js:112:42)
error Command failed with exit code 1.
Even though I’ve correctly initialised the Keystone instance. It booted fine until I added a new file to the project. I dropped the Mongo DB, just to see if that helped, but it did not.
Any idea what the above error might indicate?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Got this too, make sure you export keystone from your index.js:
module.exports.keystone = keystone;
Just got that one, also, if you are using ESM