Ahmad
Ahmad

Reputation: 129

When I Install ghost with ghost-cli I get error

I have a CentOS 7 machine with mysql server and nginx. I installed nodejs with yum install nodejs and ghost-cli.

I wanted to install ghost with ghost-cli. but when I enter the ghost install commant I get this error:

✖ Checking system Node.js version
A SystemError occurred.

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

Debug Information:
    Node Version: v6.11.1
    Ghost-CLI Version: 1.1.0
    Environment: production
    Command: 'ghost install'

What's caused this error and how can I fix that? Thank you.

Upvotes: 2

Views: 1778

Answers (1)

mohitsharma44
mohitsharma44

Reputation: 316

[Edited after Austin, the core contributor of Ghost-CLI, responded to the issue]

I asked Austin, why he chose to not use local npm version?

He responded:

The reason for that is ghost creates a specific ghost user with which to run ghost. If you install nvm locally (e.g. in ~/.nvm), there is a very real (e.g. has happened several times) possibility that the created ghost user won't be able to run ghost because the home folder doesn't allow read permissions for everyone on the filesystem.

Going to close this issue for now - if more people have issues with this then we can reopen and figure out a better solution


Ok, so looks like you were able to resolve by running the installation as root but this is not something that I can do so I dug a little deeper into code that was pushed in the last couple of days to Ghost-CLI and my best guess is that this specific commit fix nvm -- ea30015 is causing the permission issue.

I have created an issue #447 with Ghost-CLI project to see if they can confirm it as well.

Upvotes: 1

Related Questions