Ghost-CLI: Better error handling when system runs out of memory

Trying to run ghost install --no-setup I got this error:

$ ghost install --no-setup $ cat ghost-cli-debug-xxx.log

Debug Information:
    Node Version: v6.10.3
    Ghost-CLI Version: 1.0.0-alpha.16
    Environment: production
    Command: 'ghost install --no-setup'
An error occurred.
Message: 'Command failed: yarn install --no-emoji --no-progress
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
'

Stack: Error: Command failed: yarn install --no-emoji --no-progress
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...

    at Promise.all.then.arr (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:210:11)
    at process._tickCallback (internal/process/next_tick.js:109:7)

Not sure what caused this?

Trying to run the installer again results in:

$ ghost install --no-setup

A SystemError occured.

Message: Current directory is not empty, Ghost cannot be installed here.

Debug Information:
    Node Version: v6.10.3
    Ghost-CLI Version: 1.0.0-alpha.16
    Environment: production
    Command: 'ghost install --no-setup'

I understand why this is, but it’s not very helpful 😁 - if the installer fails, I should be able to try again I think?

First issue is something I want to get to the bottom of, clean re-installs is something for later.

About this issue

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

Most upvoted comments

@acburdine Thank you. Look like my system was running out of memory. I will try again after I upgrade the vps .

update : It can be successfully installed after I configured the swap. thanks

dd if=/dev/zero of=/var/swap bs=1k count=1024k mkswap /var/swap swapon /var/swap echo ‘/var/swap swap swap default 0 0’ >> /etc/fstab

Definitely an out of memory exception (Ubuntu 16.04.2 with node 6.11.1 installing Ghost 1 RC); I have 512M on a droplet – adding a 1G swap file fixed it.

My thought is that this problem was originally related to an out-of-memory issue. The error handling around this has been fixed, so I’m going to go ahead and close this. If this does turn out to be something other than an out-of-memory issue then we can either reopen this issue or create a new one 😄

yarn cache clean

@francescomugnai: You are a godsend. I was trying to install Ghost 4.3.2 on my Ubuntu 20.04 instance at DigitalOcean. I kept getting the same A ProcessError occurred messages. Spent nearly a day searching DuckDuckGo and Google for the answer. $yarn cache clean did it for me and I was able to install Ghost, finally.

Thanks for this. I think many guys/gals will thank you for this. This should be be included in the Troubleshoot area of Ghost.

I can confirm that the command ‘yarn cache clean’ solved the problem. Now it works like a charm. Thanks

Happened for me on ghost install local.

A ProcessError occured.

Error occurred running command: 'yarn install --no-emoji --no-progress'

Exit code: 1


Debug Information:
    Node Version: v6.10.3
    Ghost-CLI Version: 1.0.0-beta.3
    Environment: development
    Command: 'ghost install local'

Additional log info available in: /root/.ghost/logs/ghost-cli-debug-2017-07-05T10_08_17_269Z.log
root@dev-kate-01:~/tests/2# cat  /root/.ghost/logs/ghost-cli-debug-2017-07-05T10_08_17_269Z.log
Debug Information:
    Node Version: v6.10.3
    Ghost-CLI Version: 1.0.0-beta.3
    Environment: development
    Command: 'ghost install local'
Error occurred running command: 'yarn install --no-emoji --no-progress'

Exit code: 1

--------------- stdout ---------------
yarn install v0.24.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info This module is OPTIONAL, you can safely ignore this error
info If you think this is a bug, please open a bug report with the information provided in "/root/tests/2/versions/1.0.0-beta.2/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


--------------- stderr ---------------
warning Error running install script for optional dependency: "/root/tests/2/versions/1.0.0-beta.2/node_modules/dtrace-provider: spawn ENOMEM"
error An unexpected error occurred: "/root/tests/2/versions/1.0.0-beta.2/node_modules/jsonpath: spawn ENOMEM".

@evilpilaf your error is actually a different one - it’s the same as being reported in #228