question-mark
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.

0.7.4 -> 0.7.8 Cannot read property 'getDatabaseVersion' of undefined

See original GitHub issue

Issue Summary

During an upgrade (forgot a few), so was going from 0.7.4 to 0.7.8. I followed the source upgrade, like usual and after starting the service. I was met with this.

> ghost@0.7.8 start /home/connor/ghost
> node index

ERROR: Cannot read property 'getDatabaseVersion' of undefined 

 TypeError: Cannot read property 'getDatabaseVersion' of undefined
    at Object.init (/home/connor/ghost/core/server/data/migration/index.js:81:22)
    at /home/connor/ghost/core/server/index.js:72:27
    at tryCatcher (/home/connor/ghost/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/connor/ghost/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/home/connor/ghost/node_modules/bluebird/js/main/promise.js:581:18)
    at Promise._settlePromises (/home/connor/ghost/node_modules/bluebird/js/main/promise.js:697:14)
    at Async._drainQueue (/home/connor/ghost/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/home/connor/ghost/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/connor/ghost/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17) 

Steps to Reproduce

  1. Have a Centos7 box using MySQL and Ghost 0.7.4
  2. Attempt upgrade to 0.7.8
  3. See failure.

Technical details:

  • Ghost Version: 0.7.4 (before upgrade), 0.7.8 (during failure)
  • Node Version: v4.2.6
  • NPM Version: 2.14.12
  • Browser/OS: n/a
  • Database: MySQL (MariaDB 10.1.11)

It looks like the current DB version is 005. My database is 004. So I need an upgrade I think. Either way I think this commit caused it - https://github.com/TryGhost/Ghost/commit/1ad7a91f4ddbe83bb95e26a3d3bf1d980f8a4bcf

EDIT: I downgraded back to 0.7.4 and everything is working again. I’ll hold off on upgrading.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pokrfacecommented, Feb 28, 2016

I got this exact error when upgrading from 0.74 -> 0.78, and the problem turned out to be just what @ErisDS speculated: I didn’t delete the contents of core before copying the new core files over to the production install. After doing an rm -rf /myghostdirectory/core/* and then copying the 0.78 core files to a fresh empty directory, the problem behavior ceased and my blog loaded without any problems.

0reactions
ykushchcommented, Jun 13, 2016

@ErisDS Sure thing. Here it is digital ocean ghost update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot read property 'match' of undefined" during Npm install
Where typescript in one of my project fail internally with cannot read property "" of undefined ! Rolling back to v3.9 run successfully!...
Read more >
force:package:version:create: Cannot read property '0' of ...
However, when I run the force:package:version:create command, the process aborts with Cannot read property '0' of undefined.
Read more >
TypeError: Cannot read property 'split' of undefined #2127
Expected Behavior Hello Brother I would like to ignore some projects when executing the command `lerna bootstrap` Current Behavior Hello ...
Read more >
TypeError: Cannot read property 'data' of undefined
catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/ ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found