I am trying to update my Ghost installation through the console. I’ve signed in, changed directory to var/www/ghost
, and updated the Ghost CLI to the most recent version (1.31.1 as of this writing). But then when I type ghost update
I get this:
/usr/lib/node_modules/ghost-cli/lib/command.js:108
static async _run(commandName, argv = {}, extensions) {
^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/ghost-cli/lib/bootstrap.js:6:17)
I get the same result if I also switch to the Ghost manager first.
Any help would be much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi @roberttalbert,
I can see that someone reported the exact same problem in the Ghost forum here:
https://forum.ghost.org/t/ghost-cli-shows-errors-after-latest-update-to-1-11-0/7678/4
People there are suggesting that in order to fix this error you need to update your Node.js version from 6.x to 10.x.
What I could suggest here is first taking a Snapshot of your Droplet, just to be on the safe side. That way if anything goes wrong, you could always revert back.
Once you have the Snapshot taken, you could try following the steps from the Ghost forum:
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash
- apt-get install -y nodejs
nodejs --version
v10.16.0
npm --version
6.9.0
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.