Ghost 3.0 Update Q: Install Cannot Read Property 'Type' of undefined

Hello,

Trying my best to update to Ghost 3.0 but I get the following error message. I can’t quite parse it — or what I should do.

Message: Cannot read property ‘type’ of undefined
Help: Error occurred while executing the following migration: 1-add-post-page-column.js
Suggestion: journalctl -u ghost_example-com -n 50

Running jounalctl only serves a second set of error messages:

ghost_example-com.service: Main process exited, code=exited, statu
ghost_example-com.service: Unit entered failed state.
systemd[1]: ghost_example-com.service: Failed with result ‘exit-code’.

Everything else is up-to-date on the install. Weird. Any and all thoughts are hugely appreciated as I’m far past any of my own brainy ideas.

— Geoff

Hey @gmansf - can you post the rest of the debug output?

As in, what Ghost-CLI version you’re using, what OS you’re on, and what Ghost version you were upgrading from? That will help with trying to reproduce the issue :smile:

Thanks for getting back to me AC.

The CLI is the most recent (just updated).
OS is Ubuntu 16.04.5 LTS.
Node.js is the most recent v10.

Does that help narrow it down at all?

— G.

Same issue here.
Error:

 Unable to upgrade Ghost from v2.28.1 to v3.0.0. Would you like to revert back to v2.28.1? Yes

Output of /home/www-user/.ghost/logs/ghost-cli-debug-2019-10-23T04_05_52_172Z.log

Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v10.16.0
    Ghost-CLI Version: 1.12.0
    Environment: production
    Command: 'ghost update'
Message: Cannot read property 'type' of undefined
Help: Error occurred while executing the following migration: 1-add-post-page-column.js
Suggestion: journalctl -u ghost_blog-natelab-us -n 50
Stack: Error: Cannot read property 'type' of undefined
    at Server.server.close (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:38:28)
    at Object.onceWrapper (events.js:286:20)
    at Server.emit (events.js:198:13)
    at emitCloseNT (net.js:1618:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I’m experiencing this too.

Debug Information:
OS: Ubuntu, v18.04
Node Version: v10.16.3
Ghost-CLI Version: 1.12.0
Environment: production
Command: 'ghost restart'

Hi yall! Was able to reproduce this bug locally. The sad news it’s a legit bug. A bit better news there’s a workaround if you haven’t run the migration yet - update to the latest 2.x.x version first (atm it’s 2.37.0) and then update to 3.0.0. I realize people reading this would probably be looking for a solution to existing problem, but still heads up if you haven’t pressed the update button yet.

A proper bug fix is in progress will update once there’s more details :wink:

Thanks so much Gargol! I really appreciate it. I guess I’ll hold off on updating till the bug is fixed.

— G.

Hey @gmansf :wave: This only affects people who are migrating from 2 specific versions of Ghost 2.28.0 and 2.28.1, unfortunately :/ Have prepared a fix for this migration here:

Would appreciate if you could give it a spin locally if possible. The fix should be out with the next release.

1 Like

Thanks gargol regardless.

Possibly revealing my deep ignorance, I wonder if there is there a way to update to 2.29 and then to 3.0? If so, I’d love to know how.

— G.

The update command supports specifying the version

So you can run ghost update 2.37.0 to get to the latest 2.x release of Ghost :slight_smile:

as an update to my post above, i was able to upgrade to 2.37 as mentioned above, then again to 3.0 without issue. Thanks all!