# Failed Download

**URL:** <https://forum.ghost.org/t/failed-download/43332>\
**Category:** Developer help\
**Created:** [December 12, 2023, 5:27pm UTC](https://forum.ghost.org/t/failed-download/43332 "2023-12-12T17:27:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 5:27pm UTC](https://forum.ghost.org/t/failed-download/43332/1 "2023-12-12T17:27:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [December 12, 2023, 5:43pm UTC](https://forum.ghost.org/t/failed-download/43332/2 "2023-12-12T17:43:27Z")

</div>

> [@Ghostof0z](#):
>
> npm WARN EBADENGINE required: { node: ‘^12.22.1 || ^14.17.0 || ^16.13.0 || ^18.0.0’ },

> [@Ghostof0z](#):
>
> $ node -v
> 
> v21.4.0

There’s your answer!

---

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 6:39pm UTC](https://forum.ghost.org/t/failed-download/43332/3 "2023-12-12T18:39:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [December 12, 2023, 7:05pm UTC](https://forum.ghost.org/t/failed-download/43332/4 "2023-12-12T19:05:42Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 7:10pm UTC](https://forum.ghost.org/t/failed-download/43332/5 "2023-12-12T19:10:28Z")

</div>

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](https://apple.stackexchange.com/questions/171530/how-do-i) )

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](https://stackoverflow.com/questions/35249204/node-already-installed-its-just-not-linked) )

---

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 7:48pm UTC](https://forum.ghost.org/t/failed-download/43332/6 "2023-12-12T19:48:35Z")

</div>

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](https://github.com/npm/cli/releases/tag/v10.2.5)

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”

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [December 12, 2023, 8:04pm UTC](https://forum.ghost.org/t/failed-download/43332/7 "2023-12-12T20:04:24Z")

</div>

> [@Ghostof0z](#):
>
> Im new to coding/web dev/programing (so please be considerate)

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.

> **[Install Node on macOS, Windows, and Linux](https://ghost.org/tutorials/node/)**
>
> Step-by-step instructions on how to install Node on macOS, Windows, and Linux. With Node installed on your machine, you'll not only be able to install Ghost locally but also have access to the whole NPM ecosystem.

> **[How to install Ghost locally on Mac, PC or Linux](https://ghost.org/docs/install/local/)**
>
> A detailed local install guide for how to install the Ghost publishing platform on your computer running Mac, PC or Linux. Ideal for Ghost theme development.

---

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 8:09pm UTC](https://forum.ghost.org/t/failed-download/43332/8 "2023-12-12T20:09:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ghostof0z](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Ghostof0z](https://forum.ghost.org/u/Ghostof0z)\
**Post date:** [December 12, 2023, 8:19pm UTC](https://forum.ghost.org/t/failed-download/43332/9 "2023-12-12T20:19:43Z")

</div>

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
