I encountered the same error while installing Ghost 5.
After troubleshooting, I found the root cause: I had initially installed Ghost-CLI using pnpm. By default, pnpm (and Yarn) places global bin
and node_modules
in user-level paths (e.g., ~/.local
), whereas npm does not have this issue (npm uses system-level paths).
To resolve it, I uninstalled Ghost-CLI and reinstalled it globally with npm, which fixed the problem.
Hopefully, this solution helps others facing the same issue.