Skip to content
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

ENOENT: Error occurred running command: 'yarn info ghost versions --json' #504

Closed
1 of 2 tasks
DiegoRBaquero opened this issue Oct 18, 2017 · 9 comments
Closed
1 of 2 tasks

Comments

@DiegoRBaquero
Copy link

This issue is a

  • Bug Report
  • Feature Request

Summary

Received a yarn error while using npm. I do not have yarn and I don't plan to use it.

Steps to Reproduce (for a bug report)

Install Ghost CLI, install ghost locally using ghost install local

Technical details (will be automatically output by Ghost-CLI if an error occurs):

Error

A ProcessError occurred.

Error occurred running command: 'yarn info ghost versions --json'

Exit code: ENOENT
  • OS: Mac OS Sierra
  • Node Version: v6.11.4
  • Ghost-CLI Version: 1.1.2
  • Environment: development
  • Command: 'ghost install local'

Full log:

ghost install local
✔ Checking system Node.js version
✔ Checking current folder permissions
ℹ Checking operating system [skipped]
ℹ Checking MySQL is installed [skipped]
✖ Checking for latest Ghost version
A ProcessError occurred.

Error occurred running command: 'yarn info ghost versions --json'

Exit code: ENOENT


Debug Information:
    Node Version: v6.11.4
    Ghost-CLI Version: 1.1.2
    Environment: development
    Command: 'ghost install local'

Additional log info available in: /[...].log

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.
@DiegoRBaquero
Copy link
Author

Solved reinstalling CLI npm module: npm uninstall -g ghost-cli && npm install -g ghost-cli@latest

@vikaspotluri123
Copy link
Member

FYI the CLI uses yarn to install ghost in the background 😄

@DiegoRBaquero
Copy link
Author

DiegoRBaquero commented Oct 18, 2017

@vikaspotluri123 I know, but it is a dependency of the CLI, users are not required to have it (See #160 (comment)). However, I was being required to have it (for some reason). Reinstalling the global CLI module fixed it :)

This issue is merely for documentation, I had solved it before opening it. Hopefully people running into it won't waste time.

@alexxsanchezm
Copy link

Just to for further users that may come up with this issue. I solve this issue in basically 5 steps

  1. Uninstalling ghost-cli.
  2. Removing cmdtest sudo apt remove cmdtest
  3. Instaling yarn, see for installing yarn
  4. Installing ghost-cli: sudo npm i -g ghost-cli@latest
  5. Install ghost as usual ghost install, sudo is optional here.

@mikkqu
Copy link

mikkqu commented Feb 1, 2018

In my case /home/user/.config was not accessible from my user for some strange reason.
So, this command fixed it for me:

sudo chown -R user:user /home/user/.config

@xobs
Copy link

xobs commented May 21, 2018

The documentation is incorrect. https://docs.ghost.org/docs/install#section-install-ghost-cli

As others have mentioned, you also need to install yarn. The documentation should be updated to mention this, as simply doing sudo npm i -g ghost-cli is not enough.

@vikaspotluri123
Copy link
Member

vikaspotluri123 commented May 21, 2018

As others have mentioned, you also need to install yarn.

Yes, yarn is required for the CLI to function, but you don't need to explicitly install it - it's a dependency for the CLI, so when you run sudo npm i -g ghost-cli@latest it will be installed. In fact, there are multiple (I would guess a supermajority, but I have no data to back that up) self-hosted ghost installations (both local and production) which just use the CLI's dependency of yarn and work flawlessly, especially in the reccommended stack

The documentation is incorrect

I don't think the installation documentation is incorrect. However, this might be useful in the troubleshooting section - feel free to suggest edits!

@xobs
Copy link

xobs commented May 30, 2018

My issue was caused by something in ~/.cache/ that was causing Yarn to fail. Removing that directory and re-running the command fixed the issues.

@boovius
Copy link

boovius commented Sep 11, 2018

Fix for me was updating permissions as outlined in the following post:

https://stackoverflow.com/questions/49529696/yarn-error-eaccess-permission-denied-scandir-home-ubuntu-config-yarn-link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants