TryGhost / Ghost-CLI

CLI Tool for installing & updating Ghost
https://ghost.org
MIT License
452 stars 227 forks source link

Got "Current directory is not empty, Ghost cannot be installed here" where no files under CWD #1892

Open lemorage opened 2 weeks ago

lemorage commented 2 weeks ago

Welcome to Ghost-CLI's GitHub repo! πŸ‘‹πŸŽ‰

Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org πŸ‘«.

Docs: https://ghost.org/docs/ πŸ“–.

Please be aware that the team behind the Ghost CLI only supports the recommended stack: https://github.com/TryGhost/Ghost-cli#recommended-stack.

Summary

I knew there is a similar issue #173, but I did not find any solution there. I constantly got the same error "Current directory is not empty, Ghost cannot be installed here", where I am in a completely empty directory.

Steps to Reproduce

  1. yarn add ghost-cli@latest
  2. yarn ghost install local.

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Log file

No log file found

miao@192:~/Downloads/ghost-app/app$ yarn ghost -v
yarn run v1.22.22
warning package.json: No license field
$ /home/miao/Downloads/ghost-app/node_modules/.bin/ghost -v

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org

Ghost-CLI version: 1.26.1
Done in 0.47s.

miao@192:~/Downloads/ghost-app/app$ yarn ghost install local
yarn run v1.22.22
warning package.json: No license field

$ /home/miao/Downloads/ghost-app/node_modules/.bin/ghost install local

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org

A SystemError occurred.

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

Debug Information:
    OS: Fedora Linux, v40
    Node Version: v20.17.0
    Ghost-CLI Version: 1.26.1
    Environment: production
    Command: 'ghost install local'

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

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

miao@192:~/Downloads/ghost-app/app$ ls -lah
total 0
drwxr-xr-x. 1 miao miao  0 Oct 21 19:44 .
drwxr-xr-x. 1 miao miao 72 Oct 21 19:44 ..

Technical details

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

Bug submission checklist

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