Failed Download

Ive looked everywhere to get around this - I know several people on the forums with this issue. However when I follow along with them, I still get the same error. I have NPM/NODE/YARN installed but when I get to installing the ghost cli — the following is what I get. ----I did create a new empty dir to save under (that did not help)

I tried removing and re-installing everything and still get the same error.

$ sudo npm install ghost-cli@latest -g
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘ghost-cli@1.25.3’,
npm WARN EBADENGINE required: { node: ‘^12.22.1 || ^14.17.0 || ^16.13.0 || ^18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v21.4.0’, npm: ‘10.2.4’ }
npm WARN EBADENGINE }

changed 599 packages in 8s

156 packages are looking for funding
run npm fund for details

$ node -v

v21.4.0

$ npm -v

ya10.2.4

$ yarn -v

1.22.21

There’s your answer!

1 Like

Tried uninstalling using all applicable data from brew, nom, to nvm to manually… still showing I somehow have node installed.

$ brew uninstall --force node

$ node -v

v21.4.0

In future, please provide details of your setup, as this will help others to help you!
Try this.

brew install node@18
brew unlink node
brew link node@18
node -v

MBP 15in Sonoma 14.2

Appreciate all the extra tips (I do use google, so a lot of the answers seem to repetitive, but that is ok.)

I have done this - please see below

$ brew -v

Homebrew 4.1.25

$ node -v

-ksh: node: not found

$ npm -v

-ksh: npm: not found

$ yarn -v

env: node: No such file or directory

after running brew install node@18
Warning: No available formula with the name “@18”.

Error: Running Homebrew as root is extremely dangerous and no longer supported.

As Homebrew does not drop privileges on installation you would be giving all

build scripts full access to your system. (note to self - not to use Sudo when running brew)

This is where I am at now

$ brew install node@18

Warning: node@18 18.19.0 is already installed and up-to-date.

To reinstall 18.19.0, run:

brew reinstall node@18

$ node -v

-ksh: node: not found

$ brew unlink node

Error: No such keg: /usr/local/Cellar/node
$ brew link node@18

Linking /usr/local/Cellar/node@18/18.19.0…

Error: Could not symlink include/node/common.gypi

Target /usr/local/include/node/common.gypi

already exists. You may want to remove it:

rm ‘/usr/local/include/node/common.gypi’

To force the link and overwrite all conflicting files:

brew link --overwrite node@18

To list all files that would be deleted:

brew link --overwrite --dry-run node@18

$ node -v

-ksh: node: not found

$ brew link --overwrite node@18

Linking /usr/local/Cellar/node@18/18.19.0…

Error: Could not symlink include/node/common.gypi

/usr/local/include/node is not writable.

( I used this website to diagnose, download, and get around node/npm

macos - How do I downgrade node or install a specific previous version using homebrew? - Ask Different )

Went to this website next to follow the step-by-step

Still the same error

( node.js - Node already installed, it's just not linked - Stack Overflow )

I don’t know what happened - somehow node18 - got installed. Even with the errors.

Anyway, I am now here – please see below.

$ node -v

v18.19.0

$ npm -v

10.2.3

$ yarn -v

1.22.21

$ brew -v

Homebrew 4.1.25

$ npm install ghost-cli@latest -g

npm notice

npm notice New patch version of npm available! 10.2.3 → 10.2.5

npm notice Changelog: Release v10.2.5 · npm/cli · GitHub

npm notice Run npm install -g npm@10.2.5 to update!

npm notice

npm ERR! code EACCES

npm ERR! syscall rename

npm ERR! path /Users/xxxxxxxxx/.npm-packages/lib/node_modules/ghost-cli

npm ERR! dest /Users/xxxxxxxxx/.npm-packages/lib/node_modules/.ghost-cli-z5NbbvYi

npm ERR! errno -13

npm ERR!

npm ERR! Your cache folder contains root-owned files, due to a bug in

npm ERR! previous versions of npm which has since been addressed.

npm ERR!

npm ERR! To permanently fix this problem, please run:

npm ERR! sudo chown -R 501:20 “/Users/xxxxxxxxx/.npm”

npm ERR! A complete log of this run can be found in: /Users/xxxxxxxxx/.npm/_logs/2023-12-12T19_46_00_351Z-debug-0.log

$ ghost install local

-ksh: ghost: not found

$ npm install -g npm@10.2.5

npm ERR! code EACCES

npm ERR! syscall mkdir

npm ERR! path /Users/xxxxxxxxx/.npm-packages/lib/node_modules/npm

npm ERR! errno -13

npm ERR!

npm ERR! Your cache folder contains root-owned files, due to a bug in

npm ERR! previous versions of npm which has since been addressed.

npm ERR!

npm ERR! To permanently fix this problem, please run:

npm ERR! sudo chown -R 501:20 “/Users/xxxxxxxxx/.npm”

npm ERR! A complete log of this run can be found in: /Users/xxxxxxxxx/.npm/_logs/2023-12-12T19_46_53_034Z-debug-0.log

$ sudo chown -R 501:20 “/Users/xxxxxxxxx/.npm”

When open this, you were provided with a template, but chose to delete it.

If you’re looking for help, please provide information about your environment. If you delete this template and don’t provide any information, your topic will be automatically closed.

If you aren’t running the latest version of Ghost, the first thing we’ll ask you to do is update to the latest version of Ghost.

  • What’s your URL? This is the easiest way for others to help you
  • What version of Ghost are you using? If it’s not the latest, please update Ghost first before opening your topic

And

  • How was Ghost installed and configured?
  • What Node version, database, OS & browser are you using?
  • What errors or information do you see in the console?
  • What steps could someone else take to reproduce the issue you’re having?

Nonetheless, I’ll volunteer assistance where I can, even though I no longer use macOS.

The likely cause of your problems is permissions. My guess is that you used sudo to install Node, and this messed up permissions in your local user’s folder.

The error message suggests a way of fixing this, but you haven’t stated if this helps, nor did you do this straight away. Why did you attempt to install Node 10 when 18 is required?

Your best option is to completely remove Node, start over, and follow the official guides.

I installed node following the below

brew install node@18
brew unlink node
brew link node@18
node -v

I did have node/npm reset again.

I am also using the ghost docs website to install ghost, but unable to get to that point due to the prior issues.

now I show this… does this mean I have the ghost CLI ?

xxxxxxxxxxx@ /Users/xxxxxxxx
└── ghost-cli@1.25.3

$ ghost -v

-ksh: ghost: not found