Local install on OSX - ghost CLI stalls / fails

Hi everyone,

I’m a newbie to Ghost and node.js and while experienced at the command line I am a bit rusty and around 10 years out of date. Apologies in advance for any dumb questions.

I am trying to install Ghost locally on OSX and have some failures. I think it may be due to having conflicting Node versions installed. I’ll run you through the steps I’ve taken and the verbose output, and hopefully someone will be able to advise how I can get out of this mess I have created!

Running OSX 10.15.4 and do not have XCode installed.

Following the instructions in the Ghost Docs and Ghost for Beginners, I first endeavoured to install Node, found Yarn wasn’t installed, so added Homebrew, then Yarn, then SQLite when the process stalled. Specifically:

  1. First installed the Current Version of Node (v13.12.0) as OSX wouldn’t open the 12.16.1 installer (OSX couldn’t verify the package error message).
  2. Installed Ghost CLI then ran ghost install local, receiving an error that this version of Node isn’t supported (my mistake, I didn’t read the docs)
  3. Installed node 12.16.1 without uninstalling 13.12.0
  4. Ghost CLI and install local worked when I ran it again, but would get stuck trying to do something with Yarn, so…
  5. I installed Homebrew so I could [install Yarn following the steps on each tools respective website.
  6. Deleted everything in the Ghost folder from the half-created install tried in Step 4, and ran ghost install local --verbose
  7. The script seemed to be getting stuck installing SQLite, so I installed that via Homebrew last night.

Now, today when I run ghost install local --verbose it stops here:

[13:23:58] → verbose 37.359 node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@10.19.0 | darwin | x64
*node-pre-gyp WARN Using request for node-pre-gyp https download *
node-pre-gyp info check checked for “/Users/kate/Documents/Ghost/versions/3.12.1/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node” (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v64-darwin-x64.tar.gz
node-pre-gyp http 200 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v64-darwin-x64.tar.gz
node-pre-gyp info install unpacking node-v64-darwin-x64/node_sqlite3.node
node-pre-gyp info tarball done parsing tarball
[sqlite3] Success: “/Users/kate/Documents/Ghost/versions/3.12.1/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node” is installed via remote
node-pre-gyp info ok

When I open a new terminal and try ghost doctor or ghost config, it correctly advises that Ghost isn’t installed (makes sense since it has stalled at the above)

In short, half knowing what I’m doing has created a right mess and I’m unsure how to get out of it now :slight_smile: - it seems deleting everything to start afresh is quite hard as well. I’ve tried using Brew and NVM to uninstall node v13.x but that doesn’t work either.

Has anyone got suggestions for what on earth I’ve done here and how I can dig myself out?!

Many thanks in advance.

Hey @kater,
Were you installing yarn for theme development? yarn isn’t needed to install Ghost locally. Did you make sure you installed and were running the recommended version of node? You can find that out here: https://ghost.org/faq/node-versions/
After you have the right version of node running you should be able to install ghost-cli and run the whole local development setup in an empty folder. Was this the guide you followed?
https://ghost.org/docs/install/local/

Hi David, thanks for your reply.

I ended up installing the recommended version of Node - 10.x - but did not uninstall 13.x prior, so I do wonder if I have version clashing now.

I did follow the guide you linked to, and after installing Node 10.x it still doesn’t work. Is there a way to confirm which version of Node my system is defaulting to - I tried which node (read somewhere this is how) but it just shows the directory path.

I didn’t think I needed Yarn but something I was installing failed and it looked like Yarn was needed. I can’t remember what that was though!

  • Update: I figured out how to find the node version (node -v) and I have v10.19.0 installed, with npm v6.13.4

Thanks again for your reply.
Cheers,
Kate

Problem solved!
I updated npm, changed the OSX shell from zsh back to bash, and installed with sudo ghost install local.

1 Like