# Getting error when trying to upgrade to ghost 3.x

**URL:** <https://forum.ghost.org/t/getting-error-when-trying-to-upgrade-to-ghost-3-x/13636>\
**Category:** Installation\
**Created:** [April 18, 2020, 1:19pm UTC](https://forum.ghost.org/t/getting-error-when-trying-to-upgrade-to-ghost-3-x/13636 "2020-04-18T13:19:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatruchir](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fatruchir](https://forum.ghost.org/u/fatruchir)\
**Post date:** [April 18, 2020, 1:19pm UTC](https://forum.ghost.org/t/getting-error-when-trying-to-upgrade-to-ghost-3-x/13636/1 "2020-04-18T13:19:09Z")

</div>

I’m trying to upgrade to ghost 3.x and getting this error message detailed below (just running `ghost update`)

- What version of Ghost are you using?  
2.28.0

What configuration?  
running an AWS EC2 (t2.micro)

What errors or information do you see in the console?

> Debug Information:  
> OS: Ubuntu, v18.04  
> Node Version: v12.16.2  
> Ghost-CLI Version: 1.12.0  
> Environment: production  
> Command: ‘ghost update’  
> Message: Could not communicate with Ghost  
> Suggestion: journalctl -u ghost\_ec2-13-127-144-101-ap-south-1-compute-amazonaws-com -n 50  
> Stack: Error: Could not communicate with Ghost  
> at Server. (/usr/lib/node\_modules/ghost-cli/lib/utils/port-polling.js:56:20)  
> at Object.onceWrapper (events.js:416:28)  
> at Server.emit (events.js:310:20)  
> at emitCloseNT (net.js:1657:8)  
> at processTicksAndRejections (internal/process/task\_queues.js:83:21)

I tried running the command in the suggestion: `journalctl -u ghost_ec2-13-127-144-101-ap-south-1-compute-amazonaws-com -n 50` and then trying `ghost update` again but got the same error

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [April 18, 2020, 4:45pm UTC](https://forum.ghost.org/t/getting-error-when-trying-to-upgrade-to-ghost-3-x/13636/2 "2020-04-18T16:45:44Z")

</div>

Can you take a look at this thread and see if it helps?

> [@Attempt to Upgrade 2 to 3 fails](https://forum.ghost.org/t/attempt-to-upgrade-2-to-3-fails/13170/4):
>
> I tried the update again, and then ran that command right after it failed. Results were a little more interesting. I still don’t know how to fix, though. root@lamarche:~# journalctl -u ghost\_lamarche-photography -n 50 -- Logs begin at Mon 2019-07-01 23:52:52 UTC, end at Wed 2020-04-01 19:56:56 UTC. -- Apr 01 19:51:48 lamarche systemd[1]: ghost\_lamarche-photography.service: Scheduled restart job, restart counter is at 3. Apr 01 19:51:48 lamarche systemd[1]: Stopped Ghost systemd service for blog…

---

<div class="post-metadata">

**Author:** ![fatruchir](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fatruchir](https://forum.ghost.org/u/fatruchir)\
**Post date:** [April 19, 2020, 6:00am UTC](https://forum.ghost.org/t/getting-error-when-trying-to-upgrade-to-ghost-3-x/13636/3 "2020-04-19T06:00:40Z")

</div>

Hey - yeah that thread was helpful. To summarize, for anyone else running into this too, these are the steps I followed which did the trick for me:

check `node -v` which gave `v12.16.2` and `nodejs -v` which gave `v8.16.2` (the nodejs version \< 10 is the source of the problem AFAIK)

I removed this version of nodejs using `sudo apt-get remove nodejs` and then installed nodejs v12.x (13.x seems to be latest but I think ghost doesn’t support nodejs v13 yet) from nodesource: [distributions/README.md at master · nodesource/distributions · GitHub](https://github.com/nodesource/distributions/blob/master/README.md)

check `node -v` and `nodejs -v` which now both give `v12.16.2`

then

```auto
ghost stop
ghost update
ghost start

```

Thanks vikas!
