I cannot install ghost-cli
using the Yarn package manager.
The docs state I can use Yarn to install ghost-cli. It doesn’t give the command, so I assume I can do the following but I get an error:
yarn set version 4.5.3
yarn add ghost-cli@latest -g
Unknown Syntax Error: Command not found; did you mean one of:
0. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
1. yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
I try without the -g
. It installs, but the ghost
command is not found:
$ yarn add ghost-cli@latest
➤ YN0000: · Yarn 4.5.3
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + ghost-cli@npm:1.26.1, @samverschueren/stream-to-observable@npm:0.3.1, @sindresorhus/is@npm:0.14.0, @sindresorhus/is@npm:0.7.0, @sindresorhus/is@npm:4.6.0, and 533 more.
➤ YN0000: └ Completed in 9s 637ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 249ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ yarn@npm:1.22.19 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 0s 922ms
➤ YN0000: · Done with warnings in 10s 883ms
$ ghost help
Command 'ghost' not found, did you mean:
command 'gost' from snap gost (2.12.0)
command 'host' from deb bind9-host (1:9.18.28-0ubuntu0.22.04.1)
command 'gfhost' from deb gfarm-client (2.7.17+dfsg-1build2)
command 'rhost' from deb jdresolve (0.6.1-5.1)
command 'xhost' from deb x11-xserver-utils (7.7+9build1)
command 'qhost' from deb gridengine-client (8.1.9+dfsg-10build1)
command 'khost' from deb knot-host (3.1.6-1ubuntu1)
command 'gost' from deb gost (0.1.0+git20181204.5afeda5e-1.1ubuntu0.22.04.2)
See 'snap info <snapname>' for additional versions.
I learn that Yarn does not allow globally installed packages now and instead encourage the use of temporary package execution using the yarn dlx
sub-command. I run ‘ghost install local’ from the ‘ghost-cli’ package and I get an error saying a dependency has no candidates:
$ yarn dlx ghost install local -p ghost-cli@latest
➤ YN0000: · Yarn 4.5.3
➤ YN0000: ┌ Resolution step
➤ YN0082: │ @tryghost/email-content-generator@npm:0.0.0: No candidates found
➤ YN0000: └ Completed in 10s 330ms
➤ YN0000: · Failed with errors in 10s 351ms
Ghost Version
5.104.2
Node.js Version
20.18.1
How did you install Ghost?
I’m trying to install Ghost using the ghost-cli on Ubuntu 22.04
Database type
SQLite3
Browser & OS version
Ubuntu 22.04