# Ghost does not start after 'ghost install local'

**URL:** <https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566>\
**Category:** Installation\
**Created:** [November 8, 2023, 6:14pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566 "2023-11-08T18:14:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 6:14pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/1 "2023-11-08T18:14:42Z")

</div>

HELP! I cannot make Ghost work after `ghost install local`.  
I have reinstalled nvm, nodejs, npm, the chalk module etc. and reconfigured everything if I missed something, but still cannot figure out the solution.  
(A had an older version of Ghost working on the same system, I just gave it another try and restarted with installing the current version.)

after `ghost start` I got:

````auto
Running in development mode

✔ Checking system Node.js version - found v18.18.2
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Checking binary dependencies
✖ Starting Ghost: ghost-local
A GhostError occurred.

Message: 
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module 'chalk'
Require stack:
- /home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/lib/styles.js
- /home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/lib/pretty-cli.js
- /home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/index.js
- /home/path/to/my/ghost/project/versions/5.72.1/core/cli/command.js
- /home/path/to/my/ghost/project/versions/5.72.1/ghost.js
- /home/path/to/my/ghost/project/versions/5.72.1/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/lib/styles.js:1:15)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/lib/styles.js',
    '/home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/lib/pretty-cli.js',
    '/home/path/to/my/ghost/project/versions/5.72.1/node_modules/@tryghost/pretty-cli/index.js',
    '/home/path/to/my/ghost/project/versions/5.72.1/core/cli/command.js',
    '/home/path/to/my/ghost/project/versions/5.72.1/ghost.js',
    '/home/path/to/my/ghost/project/versions/5.72.1/index.js'
  ]
}

Node.js v18.18.2

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.18.2
    Ghost Version: 5.72.1
    Ghost-CLI Version: 1.25.3
    Environment: development
    Command: 'ghost start'

Additional log info available in: /home/aaao/.ghost/logs/ghost-cli-debug-2023-11-08T18_01_50_131Z.log

Try running ghost doctor to check your system for known issues.
.```

BTW, I read on https://ghost.org/docs/install/local/ that  
* The SQLite3 database is auto-setup and located in `/content/data/`
but the folder is empty.
````

---

<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:** [November 8, 2023, 6:53pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/2 "2023-11-08T18:53:00Z")

</div>

> [@aaao](#):
>
> `Error: Cannot find module 'chalk'`

Have you attempted to install this dependency, e.g., `npm install chalk`?

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 7:01pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/4 "2023-11-08T19:01:04Z")

</div>

Yes, but after `npm install chalk` I got the same error.

---

<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:** [November 8, 2023, 7:15pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/5 "2023-11-08T19:15:21Z")

</div>

Without knowing how your system is set up, it’s difficult to diagnose the issue. However, you might have installed Node twice. Since you’re using Ubuntu, I’d avoid `nvm` and install from the official Node repository using APT.

```auto
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash
sudo apt install nodejs --yes
sudo npm install ghost-cli@latest -g

```

You can also see what you have installed with …

```auto
npm list -g --depth=1

```

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 7:20pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/6 "2023-11-08T19:20:20Z")

</div>

I have also tried with the official Node repo using apt, the same error occured.

---

<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:** [November 8, 2023, 7:26pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/7 "2023-11-08T19:26:17Z")

</div>

Using APT and `nvm` at the same time may have caused the issue. I’d remove Node completely, and then reinstall, using APT and the official repository. This method has never let me down, and upgrading Node versions is a breeze (as required by recent updates to Ghost.)

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 7:59pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/8 "2023-11-08T19:59:05Z")

</div>

I deleted nvm and all nodejs versions and reinstalled Node with apt, so now:

`nodejs -v`  
v18.18.2

`npm -v`  
9.8.1

After `sudo npm install ghost-cli@latest -g` or `npm i ghost-cli`  
`ghost --version`  
Ghost-CLI version: 1.23.0  
(but isn’t the latest version is 1.25.3?)

Then after  
`ghost install local`  
I got the following error:

```auto
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run `npm install -g ghost-cli@latest` to upgrade.

✖ Checking system Node.js version - found v18.18.2
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
One or more errors occurred.

1) Checking system Node.js version

Message: The version of Node.js you are using is not supported.
Supported: ^12.22.1 || ^14.17.0 || ^16.13.0
Installed: 18.18.2
See https://ghost.org/docs/faq/node-versions/ for more information

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.18.2
    Ghost-CLI Version: 1.23.0
    Environment: development
    Command: 'ghost install local'

```

Despite, as I am reading on [Supported node versions for self-hosted installs of Ghost](https://ghost.org/docs/faq/node-versions/) :

```auto
Ghost’s current recommended Node version is Node v18 LTS.
Version	Support Level
17.x and below	Unsupported
18.x (Node v18 Hydrogen LTS)	Recommended
19.x and above	Unsupported

```

---

<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:** [November 8, 2023, 8:00pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/9 "2023-11-08T20:00:41Z")

</div>

> [@aaao](#):
>
> I got the following error:
> 
> ```auto
> You are running an outdated version of Ghost-CLI.
> It is recommended that you upgrade before continuing.
> Run `npm install -g ghost-cli@latest` to upgrade.
> 
> ```

So, on Ubuntu, run `sudo npm install -g ghost-cli@latest`.

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 8:09pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/10 "2023-11-08T20:09:04Z")

</div>

After  
`sudo npm install -g ghost-cli@latest`  
the same ghost-cli version:  
Ghost-CLI Version: 1.23.0

and the same error after `ghost install local`

---

<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:** [November 8, 2023, 8:39pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/11 "2023-11-08T20:39:38Z")

</div>

I suspect your environment needs some tidying up to remove all traces of Node. Indeed, I just did a local installation on Ubuntu 23.10 and it worked fine.

## Install prerequisites including Node

- See [GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions](https://github.com/nodesource/distributions)

```sh
sudo apt update
sudo apt install --yes ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

sudo apt update
sudo apt install --yes nodejs

```

## Install Ghost-CLI

- See [How To Install Ghost Locally - Ghost Developer Docs](https://ghost.org/docs/install/local/)

```sh
sudo npm install -g ghost-cli@latest
# Advised that newer version of npm available
sudo npm install -g npm@10.2.3

```

## Install Ghost

```sh
mkdir -p ~/ghost/test
cd ~/ghost/test
ghost install local

```

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/c/9/c9c92f051c71aecb495d3848271b944bcb5ad659.png)

---

<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:** [November 8, 2023, 8:43pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/12 "2023-11-08T20:43:43Z")

</div>

> [@aaao](#):
>
> `ghost --version`  
> Ghost-CLI version: 1.23.0  
> (but isn’t the latest version is 1.25.3?)

Yes, the latest is 1.25.3. You could try `ghost buster`.

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 8, 2023, 8:49pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/13 "2023-11-08T20:49:25Z")

</div>

Ok, I will clean my os again and hope the best, thanks!

---

<div class="post-metadata">

**Author:** ![aaao](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaao/32/27246_2.png) [@aaao](https://forum.ghost.org/u/aaao)\
**Post date:** [November 9, 2023, 8:38pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/14 "2023-11-09T20:38:47Z")

</div>

Hi again… and thanks!  
I upgraded Ubuntu to 23.04 first, which did not solve the problem (of messed up node versions and packages), but  
after I reinstalled Ubuntu 22.04, the official instructions you advised for installing Ghost worked. Thanks again! 💚

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [February 7, 2024, 8:39pm UTC](https://forum.ghost.org/t/ghost-does-not-start-after-ghost-install-local/42566/15 "2024-02-07T20:39:40Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
