Ghost-CLI: Installing v1.1.0 throws `two version of Node` error

This issue is a

  • [ x ] Bug Report

Summary

Tried installing v1.1.0 in a vagrant environment using nvm and node v6.11.2 today and causes the following error:

The version of Ghost-CLI you are running was not installed with this version of Node.\n
This means there are likely two versions of Node running on your system, please ensure\n
that you are only running one global version of Node before continuing

Steps to Reproduce

  1. Install nvm and source it (based on readme instructions here: https://github.com/creationix/nvm)
  2. nvm install v6.11.2
  3. symlink the node executable to /usr/local/bin
  4. npm install -g sqlite3
  5. npm install -g ghost-cli
  6. cd into the directory where I want to install ghost and run ghost install local --url=http://127.0.0.1 --ip=0.0.0.0 --port-2368 --db=sqlite3 --no-prompt

Note that above command is executed without root privileges. the above line will throw the error.

The above installation steps worked fine exactly 2 days ago when I created a playbook.

To me, it looks like it was caused due to this specific commit: https://github.com/TryGhost/Ghost-CLI/commit/ea30015

Technical details:

  • OS: Trusty64
  • Node Version: 6.11.2 (also same issue with 6.11.0 and 6.11.1)
  • Ghost-CLI Version: v1.1.0
  • Environment: Vagrant (setup using Ansible)

If you need the playbook (it is one, big, ugly, yaml file since it’s a part of tutorial): https://github.com/Mohitsharma44/ansible-playbooks/blob/master/test/vagrant3/playbook.yml

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (7 by maintainers)

Commits related to this issue

Most upvoted comments

I rolled back ghost-cli one version at a time and then kept trying to run ghost install. It was successful once I installed ghost-cli v1.0.3.

[root@web01-nyc1 ghost]# ghost --version
Ghost-CLI version: 1.0.3
[root@web01-nyc1 ghost]# ghost install -V
[22:25:00] Checking system Node.js version [started]
[22:25:00] Checking system Node.js version [completed]
[22:25:00] Checking current folder permissions [started]
[22:25:00] Checking current folder permissions [completed]
[22:25:00] Checking operating system [started]
System checks failed with message: 'Linux version is not Ubuntu 16'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? (y/N)