Skip to main content

Error

If you see either of these errors when using Ghost-CLI:
or
Then either python3 or setuptools are missing from your machine. Follow the instructions above to get them installed.

To fix

Starting with Node.js v22, there are no longer pre-built binaries to download for the sqlite3 module. To successfully build a binary for Node 22 you’ll need to have python 3 and setuptools installed. Ensure these tools are available by following the instructions below for your machine:
  • MacOS users with Brew: brew install python-setuptools - will install python3 + setuptools
  • MacOS users with Python installed locally: python3 -m pip install setuptools - will install setuptools
  • Ubuntu users: apt install python3-setuptools - will install python3 + setuptools
  • Windows users: run winget search Python.Python.3 to find available versions, then winget install Python.Python.3.x (replace x with the minor version, e.g. Python.Python.3.12) to install python3; then pip install setuptools will install setuptools

Cannot find module ‘sqlite3’

You may also see error messages like:
If you’re trying to use Ghost with sqlite3 without using Ghost-CLI. The same fixes above apply.

Cannot install packages setuptools

You may also see error message on Windows while installing setuptools like:
This is because the Windows API maximum length for a path is 260 characters. To overwrite the behaviour, change the registry setting to enable long paths.