Issue when I try to upgrade Ghost Blog


#1

Hello,

I am using Ghost version 0.11.1, and now want to upgrade Ghost version 2.0. But I could not do that. I got an issue with node as below:

root@ghost-1gb-sgp1-01:~# ghost update
/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/node_modules/find-up/index.js:5
module.exports = (filename, opts = {}) => {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at pkgUp (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:510:20)
at guessVersion (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:812:17)
at Object.version (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:789:13)

It also got the same issue with another ghost command

root@ghost-1gb-sgp1-01:~# ghost --version
/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/node_modules/find-up/index.js:5
module.exports = (filename, opts = {}) => {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at pkgUp (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:510:20)
at guessVersion (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:812:17)
at Object.version (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:789:13)

I am not a developer, so hard to understand what happened with node. Could you please help me find out and how to solve this issue? also let me know upgrade to version 2.0.
Thank you so much.

Here are some information about Ghost environment.


#2

Here are the docs for upgrading to Ghost 2.0. Note that you need to be on 1.x to migrate to 2.x

The CLI won’t work for Ghost 0.x, and based on your context, it looks like you’re trying to use it for that. If you need help migrating from 0.x to 1.x, check out the docs:


#3

thank you @vikaspotluri123 , sure I did follow those. But, it returned an issue with node js as I mentioned on my question. Now I need to fix that before continue to upgrade.


#4

Are you working with a Ghost 1.x instance? Could you provide more details as to what you’ve done so far?


#5

I am using Ghost version 0.11.7 and used ghost CLI to upgrade.

1837 systemctl status ghost
1838 npm install ghost-cli
1839 npm install ghost-cli -g
1840 ghost update

So maybe I need to read the instruction for migrating from 0.x to 1.x. Thank you.


closed #6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.