Can't get Ghost to work locally because of Node version

I am trying to get a local installation of ghost up to play around with the themes a bit.
I am following this guide but when I do ghost install local I get the error

Message: The version of Node.js you are using is not supported.
Supported: ^10.13.0 || ^12.10.0 || ^14.15.0
Node Version: v15.4.0

So I tried installing the supported Node version for this project only using

npm install node@14.15.0 --save-exact

Afterwards I run ghost install local and it says the

A SystemError occurred.
Message: Current directory is not empty, Ghost cannot be installed here.

How can I install the supported node version for this directory only? is that possible?

1 Like

Hi

I am also facing the same issue. Could anyone please help me with this?

For this error, make sure that the directory is empty. It’s not the case when an install failed.
Go into your ghost directory and:

 rm -rf *

Or, if you are unsure, go to the upper level, remove and recreate the directory:

cd ..
rm -rf yourdirectory
mkdir yourdirectory
cd yourdirectory

For the node version, it’s not enough to install it. You need to activate afterwards. It’s easier to use nvm for that:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
nvm install 14
nvm use 14
nvm alias default node
node --version

the alias line make it persistent

Those commands are for Linux. If you uses Mac, you can install nvm with homebrew:

brew install nvm
3 Likes

Thank you for your help.

Im running on windows tho. I tried nvm-windows and couldn’t get it to work.