Whenever I try to install ghost using ghost install
I am getting this in my journal:
Jan 08 14:42:20 web3 node[13063]: Message: 'Invalid version. Must be a string. Got type "object".'
Jan 08 14:42:20 web3 node[13063]: Debug Information:
Jan 08 14:42:20 web3 node[13063]: OS: Ubuntu, v24.04.1 LTS
Jan 08 14:42:20 web3 node[13063]: Node Version: v20.18.1
Jan 08 14:42:20 web3 node[13063]: Ghost-CLI Version: 1.26.1
Jan 08 14:42:20 web3 node[13063]: Environment: production
Jan 08 14:42:20 web3 node[13063]: Command: 'ghost run'
Jan 08 14:42:20 web3 node[13063]: A promise was rejected but did not have a .catch() handler:
Jan 08 14:42:20 web3 node[13063]: Error: EACCES: permission denied, mkdir '/home/ghost/.ghost/logs'
Jan 08 14:42:20 web3 node[13063]: at Object.mkdirSync (node:fs:1371:26)
Jan 08 14:42:20 web3 node[13063]: at module.exports.makeDirSync (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra>
Jan 08 14:42:20 web3 node[13063]: at System.writeErrorLog (/usr/lib/node_modules/ghost-cli/lib/system.js:361:12)
Jan 08 14:42:20 web3 node[13063]: at UI.error (/usr/lib/node_modules/ghost-cli/lib/ui/index.js:462:40)
Jan 08 14:42:20 web3 node[13063]: at RunCommand._run (/usr/lib/node_modules/ghost-cli/lib/command.js:202:16)
Jan 08 14:42:20 web3 node[13063]: /usr/lib/node_modules/ghost-cli/lib/bootstrap.js:29
Jan 08 14:42:20 web3 node[13063]: throw reason;
Jan 08 14:42:20 web3 node[13063]: ^
Jan 08 14:42:20 web3 node[13063]: Error: EACCES: permission denied, mkdir '/home/ghost/.ghost/logs'
Jan 08 14:42:20 web3 node[13063]: at Object.mkdirSync (node:fs:1371:26)
Jan 08 14:42:20 web3 node[13063]: at module.exports.makeDirSync (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra>
Jan 08 14:42:20 web3 node[13063]: at System.writeErrorLog (/usr/lib/node_modules/ghost-cli/lib/system.js:361:12)
Jan 08 14:42:20 web3 node[13063]: at UI.error (/usr/lib/node_modules/ghost-cli/lib/ui/index.js:462:40)
Jan 08 14:42:20 web3 node[13063]: at RunCommand._run (/usr/lib/node_modules/ghost-cli/lib/command.js:202:16) {
Jan 08 14:42:20 web3 node[13063]: errno: -13,
Jan 08 14:42:20 web3 node[13063]: code: 'EACCES',
Jan 08 14:42:20 web3 node[13063]: syscall: 'mkdir',
Jan 08 14:42:20 web3 node[13063]: path: '/home/ghost/.ghost/logs'
Jan 08 14:42:20 web3 node[13063]: }
Jan 08 14:42:20 web3 node[13063]: Node.js v20.18.1
Jan 08 14:42:20 web3 systemd[1]: ghost_example-com.service: Main process exited, code=exited, status=1/FAILURE
Any help with that?
The folder /home/ghost/.ghost/
indeed does not exist. The user however does exist. If I create it manually, the log is:
Debug Information:
OS: Ubuntu, v24.04.1 LTS
Node Version: v20.18.1
Ghost-CLI Version: 1.26.1
Environment: production
Command: 'ghost run'
An error occurred.
Message: 'Invalid version. Must be a string. Got type "object".'
Stack: TypeError: Invalid version. Must be a string. Got type "object".
at new SemVer (/usr/lib/node_modules/ghost-cli/node_modules/semver/classes/semver.js:19:13)
at Object.major (/usr/lib/node_modules/ghost-cli/node_modules/semver/functions/major.js:2:29)
at RunCommand.useDirect (/usr/lib/node_modules/ghost-cli/lib/commands/run.js:54:29)
at RunCommand.run (/usr/lib/node_modules/ghost-cli/lib/commands/run.js:23:21)
at RunCommand._run (/usr/lib/node_modules/ghost-cli/lib/command.js:197:35)