Ghost 2.9.1: The engine "cli" is invalid


#1

I do not understand what is going on with my attempt to install ghost. I keep getting this error and I am not sure how to resolve it so I can move forward.

Message: Command failed: yarn install --no-emoji --no-progress

warning ghost@2.9.1: The engine “cli” appears to be invalid.
error An unexpected error occurred: “/home/*****-ghost-blog/.cache/yarn/v2/npm-xtend-4.0.1-a5c6d532be656e23db820efb943a1f04998d63af/.yarn-metadata.json: Unexpected end of JSON input”.

yarn install v1.9.4
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
info If you think this is a bug, please open a bug report with the information provided in “/var/www/ghost/versions/2.9.1/yarn-error.log”.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Exit code: 1

Debug Information:
OS: Ubuntu, v16.04
Node Version: v8.9.1
Ghost-CLI Version: 1.9.8
Environment: production
Command: ‘ghost install’

Any help with this issue would be greatly appreciated.


#2

So I was able to solve this problem by running yarn cache clean command.


#3

warning ghost@2.9.1: The engine “cli” appears to be invalid.

This is just a warning and is expected, the error is the second line:

 An unexpected error occurred: “/home/*****-ghost-blog/.cache/yarn/v2/npm-xtend-4.0.1-a5c6d532be656e23db820efb943a1f04998d63af/.yarn-metadata.json: Unexpected end of JSON input”.

Glad you managed to get this fixed by clearing the yarn cache.


#4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.