Ghost-CLI icon indicating copy to clipboard operation
Ghost-CLI copied to clipboard

Bug: Installation fails on Windows with NodeJS 22+

Open vasiltabakov opened this issue 4 months ago • 4 comments

Summary

Installing ghost on Windows via ghost install local fails complaining about Sqlite3 and missing python, but I already have python installed in my system:

[19:07:54] → Python is required for SQLite3
One or more errors occurred.

1) Checking SQLite build dependencies

Message: Python is required for SQLite3

Debug Information:
    OS: Microsoft Windows 11 Pro, v10.0.26100
    Node Version: v22.16.0
    Ghost-CLI Version: 1.28.3
    Environment: development
    Command: 'ghost install local --verbose'

Steps to Reproduce

  1. On windows using the latest cli try ghost install local

It doesn't work even after following the instructions here: https://docs.ghost.org/faq/python-setuptools-required-sqlite3

Clearly the issue is because of how the CLI checks for python: https://github.com/TryGhost/Ghost-CLI/blob/main/lib/commands/doctor/checks/python-setuptools.js#L10

  • python3 will not work on Windows, it has to be python
  • after making a symbolic link named python3 (via mklink) the installation succeeded

vasiltabakov avatar Aug 19 '25 16:08 vasiltabakov

I was not able to sidestep the issue with mklink but this is user error. Where should a developer place the link?

The ghost CLI tool strictly enforces an empty working directory. I hoped to install ghost-cli to an npm project, hack on the offending script, and invoke ghost-cli locally like npm run ghost -- install local. At this point, it's probably easier to move back to a nix box.

bever1337 avatar Aug 20 '25 03:08 bever1337

I was not able to sidestep the issue with mklink but this is user error. Where should a developer place the link?

Wherever your python.exe is, I just cd'ed to the python installation directory and did mklink python3.exe python.exe, of course need to also have python.exe's directory in your PATH.

Image

vasiltabakov avatar Aug 20 '25 06:08 vasiltabakov

Thank you. With the link in the correct directory, I am able to finish installation. Mostly. Next, ghost throws an error at startup about sqlite3 missing. That's a simple npm install and was even recommended by the error text.

bever1337 avatar Aug 21 '25 06:08 bever1337

Thank you!

ChristianIuele avatar Nov 10 '25 14:11 ChristianIuele