I’m having a strange issue, which Vikas suggested I post here.
Using node v8.9.4 or v8.15.0 to install ghost, since that’s what’s supported, the installer manages to create a node v8.2.1 directory and then install itself there anyway.
This leads to:
One or more errors occurred.
1) Checking system Node.js version
Message: The version of Node.js you are using is not supported.
Supported: ^6.9.0 || ^8.9.0 || ^10.13.0
Installed: 8.2.1
See https://docs.ghost.org/faq/node-versions/ for more information
Maybe uninstall the previous node versions if you don’t need them? Not sure if this would help, but might force the cli to use the current version instead of an old one.
This is a weird one for sure, but I’m pretty sure it’s not a Ghost thing
Ghost CLI doesn’t have any ability to install node versions. It has some code for detecting versions, but nothing for installing.
The tool that is in play that does have the ability to install node versions is nvm, and we can clearly see that in fact it is nvm that is creating a new node version because the new node version ends up inside of nvm’s folder structure.
nvm has a few different ways of determining when to install a new version of node, the main one that I am aware of being .nvmrc files. There are no .nvmrc files in Ghost or Ghost-CLI at present.
My best guess is that you have a rogue .nvmrc file somewhere, or some other nvm config that’s confusing nvm into installing a new node version before installing the global.
As for where - maybe in the folder or parent of your current working dir when you’re trying to install Ghost-CLI, or maybe in your home folder, or any folders to do with where npm or nvm install things.