New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghost-cli fails at checking node version #796

Open
AlexDaciuk opened this Issue Aug 21, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@AlexDaciuk
Copy link

AlexDaciuk commented Aug 21, 2018

Summary

I'm using Ghost in Github Pages with this tutorial, everything is going fine until a few days ago when I wanted to update the Ghost version ( to Ghost 2, but first needed to be in latest v1 )

Steps to Reproduce

  1. ghost update --v1

Log file

The ghost update --v1 output

Found a development config but not a production config, running in development mode instead
✖ Checking system Node.js version
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Checking memory availability
One or more errors occurred.

1) SystemError

Message: The path /home/alexarch/ is not readable by other users on the system.
This can cause issues with the CLI, please either make this directory readable by others or install node and Ghost-CLI in another location.

Debug Information:
    OS: linux, v4.18.3-arch1-1-ARCH
    Node Version: v8.9.4
    Ghost-CLI Version: 1.9.1
    Environment: development
    Command: 'ghost update --v1'

Try running ghost doctor to check your system for known issues.

If I run ghost doctor -V

Found a development config but not a production config, running in development mode instead
[15:23:33] Checking system Node.js version [started]
[15:23:33] Checking system Node.js version [failed]
[15:23:33] → The path /home/alexarch/ is not readable by other users on the system.
This can cause issues with the CLI, please either make this directory readable by others or install node and Ghost-CLI in another location.
[15:23:33] Ensuring user is not logged in as ghost user [started]
[15:23:33] Ensuring user is not logged in as ghost user [skipped]
[15:23:33] Checking if logged in user is directory owner [started]
[15:23:33] Checking if logged in user is directory owner [skipped]
[15:23:33] Checking current folder permissions [started]
[15:23:33] Checking current folder permissions [completed]
[15:23:33] Validating config [started]
[15:23:33] Validating config [completed]
[15:23:33] Checking memory availability [started]
[15:23:33] Checking memory availability [completed]
One or more errors occurred.

1) SystemError

Message: The path /home/alexarch/ is not readable by other users on the system.
This can cause issues with the CLI, please either make this directory readable by others or install node and Ghost-CLI in another location.

Debug Information:
    OS: linux, v4.18.3-arch1-1-ARCH
    Node Version: v8.9.4
    Ghost-CLI Version: 1.9.1
    Environment: development
    Command: 'ghost doctor -V'

I can run ghost with ghost run and write and publish without problems with that node version

Technical details

This is automatically output by Ghost-CLI if an error occurs, please copy & paste:

OS: linux, v4.18.3-arch1-1-ARCH
Node Version: v8.9.4
Ghost-CLI Version: 1.9.1
Environment: development

Bug submission checklist

Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.

  • [ *] Tried to find help in the forum & docs
  • [ *] Checked for existing issues
  • [ *] Attached log file
  • [ *] Provided technical details incl. operating system

@AlexDaciuk AlexDaciuk changed the title ghost-cli fails at checking ghost-cli fails at checking node version Aug 21, 2018

@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Aug 21, 2018

@AlexDaciuk took me a minute to figure out what was going on, but I see what the issue is here, and it's one that I'm working on getting figured out 😄

In the meantime, if you run ghost update --v1 --no-setup-linux-user it should work. It's definitely a bug though.

@acburdine acburdine self-assigned this Aug 21, 2018

@acburdine acburdine added the bug label Aug 21, 2018

@AlexDaciuk

This comment has been minimized.

Copy link
Author

AlexDaciuk commented Aug 24, 2018

Yes, adding --no-setup-linux-user worked, it did upgrade to latest v1 and then to 2.0.2 without any problems

@MrMovl

This comment has been minimized.

Copy link

MrMovl commented Feb 4, 2019

Not sure if this is related, but I am currently having a problem with node Versions too. I tried installing locally while using node 8.9.4. This passes the initial node version test:

✔ Checking system Node.js version

But installation fails because ts-lint needs another version apparently:

✖ Downloading and installing Ghost v2.13.1
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@2.13.1: The engine "cli" appears to be invalid.
error eslint@5.12.1: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0". Got "8.9.4"
error Found incompatible module

Additional info:

Debug Information:
    OS: ManjaroLinux, v18.0.2
    Node Version: v8.9.4
    Ghost-CLI Version: 1.9.9
    Environment: development
    Command: 'ghost install local'

Seems strange, that the first check passed...

@vikaspotluri123

This comment has been minimized.

Copy link
Collaborator

vikaspotluri123 commented Feb 4, 2019

@MrMovl hey 👋

I think this is a different issue than the original, but here's some info: The issue stems from the fact that Ghost has a limited set of node versions it supports, and its dependencies have their own set. Ghost supports ^8.9.0 but eslint requires ^8.10.0, and this is determined when you install dependencies (way after the CLI does its own check).

The issue of node 8.9.x not being supported bubbled up in Ghost 2.12.0 and was fixed in 2.13.0 (TryGhost/Ghost@d017cf3). What's interesting is the same error is bubbling up for you for the latest version of ghost, but I can't reproduce it 🤔 Was the exact command you ran ghost install local, or did you add anything extra (e.g. env vars)?

If you want a quick fix, you can upgrade to node v8.10.x 🙂

@jeremychevallier

This comment has been minimized.

Copy link

jeremychevallier commented Feb 6, 2019

I’m having a slightly different issue, which seems to fall into the category of node version failures as well:

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.

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

Am I missing something?

screen shot 2019-02-05 at 10 00 38 pm

PS: I can still get Ghost to install & run successfully in node v8.2.1, I just don’t get what’s happening here.

@vikaspotluri123

This comment has been minimized.

Copy link
Collaborator

vikaspotluri123 commented Feb 6, 2019

@jeremychevallier that definitely seems like a problem! However, this seems to be more of an issue with with nvm rather than the CLI, so you're more likely to get a helpful response over on the forum 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment