Bug: Installation fails on Windows with NodeJS 22+
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
- 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
python3will not work on Windows, it has to bepython- after making a symbolic link named python3 (via
mklink) the installation succeeded
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.
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.
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.
Thank you!