# A SystemError occurred

**URL:** <https://forum.ghost.org/t/a-systemerror-occurred/19790>\
**Category:** Developer help\
**Created:** [January 27, 2021, 4:25pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790 "2021-01-27T16:25:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adolf](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adolf/32/11407_2.png) [@adolf](https://forum.ghost.org/u/adolf)\
**Post date:** [January 27, 2021, 4:25pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/1 "2021-01-27T16:25:21Z")

</div>

i have some problem with ghost

A SystemError occurred.

Message: Current directory is not empty, Ghost cannot be installed here.

Debug Information:  
OS: Microsoft Windows 10 Enterprise, v10.0.18363  
Node Version: v14.15.4  
Ghost Version: 3.40.5  
Ghost-CLI Version: 1.15.3  
Environment: production

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

You can always refer to [Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.  
PS E:\demo\> ls -al  
Get-ChildItem : A parameter cannot be found that matches parameter name ‘al’.  
At line:1 char:4

- ls -al
- 

```auto

```

Exception  
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.G  
etChildItemCommand

PS E:\demo\> ghost install local --dir demo  
A SystemError occurred.

Message: Current directory is not empty, Ghost cannot be installed here.

Debug Information:  
OS: Microsoft Windows 10 Enterprise, v10.0.18363  
Node Version: v14.15.4  
Ghost Version: 3.40.5  
Ghost-CLI Version: 1.15.3  
Environment: production  
Command: ‘ghost install local --dir demo’

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

You can always refer to [Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [January 27, 2021, 4:41pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/2 "2021-01-27T16:41:20Z")

</div>

> [@adolf](#):
>
> Message: Current directory is not empty, Ghost cannot be installed here.

Can you confirm that the `demo` folder you’re referencing is empty?

---

<div class="post-metadata">

**Author:** ![adolf](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adolf/32/11407_2.png) [@adolf](https://forum.ghost.org/u/adolf)\
**Post date:** [January 27, 2021, 4:56pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/3 "2021-01-27T16:56:13Z")

</div>

thanks for your help  
now have a new error  
× Starting Ghost  
and what does it mean when you say ‘‘Can you confirm that the `demo` folder you’re referencing is empty?’’  
in my demo folder ![C8apture](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/f/f6dfd5ce0d9107f16c203470fd932560376cbdc0.png)

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [January 27, 2021, 9:04pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/4 "2021-01-27T21:04:52Z")

</div>

It looks like Ghost is already installed in the demo folder, so that’s why `ghost install` is failing

What problem do you see when you run `ghost start`?

---

<div class="post-metadata">

**Author:** ![adolf](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adolf/32/11407_2.png) [@adolf](https://forum.ghost.org/u/adolf)\
**Post date:** [January 28, 2021, 8:20am UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/5 "2021-01-28T08:20:26Z")

</div>

now thats my problem  
ghost start  
Working directory is not a recognisable Ghost installation.  
Run `ghost start` again within a folder where Ghost was installed with Ghost-CLI.

‫‪Vikas Potluri via Ghost Forum‬‏ \<‪[ghost2@discoursemail.com](mailto:ghost2@discoursemail.com)‬‏\> در تاریخ چهارشنبه ۲۷ ژانویهٔ ۲۰۲۱ ساعت ۱۴:۱۵ نوشت:‬

---

<div class="post-metadata">

**Author:** ![adolf](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adolf/32/11407_2.png) [@adolf](https://forum.ghost.org/u/adolf)\
**Post date:** [January 28, 2021, 8:40am UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/6 "2021-01-28T08:40:27Z")

</div>

HELO THERE THATS MY  
PS E:\ghost\> ghost install local

> >

A SystemError occurred.

Message: Current directory is not empty, Ghost cannot be installed here.

Debug Information:  
OS: Microsoft Windows 10 Enterprise, v10.0.18363  
Node Version: v14.15.4  
Ghost-CLI Version: 1.15.3  
Environment: production  
Command: ‘ghost install local’

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

You can always refer to [https://ghost.org/docs/api/ghost-cli/](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.  
PS E:\ghost\> ghost install local --dir GHOST  
√ Checking system Node.js version  
√ Checking current folder permissions  
√ Checking memory availability  
√ Checking free space  
√ Checking for latest Ghost version  
√ Setting up install directory  
\ Downloading and installing Ghost v3.41.2 \> Installing dependencies \> [4/5] Linking d√ Downloading and installing Ghost v3.41.2  
√ Finishing install process  
√ Configuring Ghost  
√ Setting up instance  
× Starting Ghost  
One or more errors occurred.

1. GhostError

Message:  
E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\client.js:235  
throw new Error(`${message}\n${e.message}`);  
^

Error: Knex: run  
$ npm install sqlite3 --save  
Cannot find module ‘sqlite3’  
Require stack:

- E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\dialects\sqlite3\index.js
- E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\knex.js
- E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\index.js
- E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\knex.js
- E:\ghost\GHOST\versions\3.41.2\core\server\data\db\connection.js
- E:\ghost\GHOST\versions\3.41.2\core\server\index.js
- E:\ghost\GHOST\versions\3.41.2\core\index.js
- E:\ghost\GHOST\versions\3.41.2\index.js  
at Client\_SQLite3.initializeDriver (E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\client.js:235:13)  
at Client\_SQLite3.Client (E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\client.js:69:10)  
at new Client\_SQLite3 (E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\dialects\sqlite3\index.js:17:10)  
at Knex (E:\ghost\GHOST\versions\3.41.2\node\_modules\knex\lib\knex.js:53:28)  
at Object. (E:\ghost\GHOST\versions\3.41.2\core\server\data\db\connection.js:34:20)  
at Module.\_compile (internal/modules/cjs/loader.js:1063:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1092:10)  
at Module.load (internal/modules/cjs/loader.js:928:32)  
at Function.Module.\_load (internal/modules/cjs/loader.js:769:14)  
at Module.require (internal/modules/cjs/loader.js:952:19)  
at require (internal/modules/cjs/helpers.js:88:18)  
at isDatabaseInitialisationRequired (E:\ghost\GHOST\versions\3.41.2\core\server\index.js:187:16)  
at makeGhost (E:\ghost\GHOST\versions\3.41.2\core\index.js:13:12)  
at Object. (E:\ghost\GHOST\versions\3.41.2\index.js:27:1)  
at Module.\_compile (internal/modules/cjs/loader.js:1063:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1092:10)

Debug Information:  
OS: Microsoft Windows 10 Enterprise, v10.0.18363  
Node Version: v14.15.4  
Ghost Version: 3.41.2  
Ghost-CLI Version: 1.15.3  
Environment: development  
Command: ‘ghost install local --dir GHOST’

Additional log info available in: C:\Users\Sharp.ghost\logs\ghost-cli-debug-2021-01-28T08\_30\_38\_296Z.log

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

You can always refer to [https://ghost.org/docs/api/ghost-cli/](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.

and whent try start ghost open a notepad and…  
#!/usr/bin/env pwsh  
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent

$exe=“”  
if ($PSVersionTable.PSVersion -lt “6.0” -or $IsWindows) {

# Fix case when both the Windows and Linux builds of Node

# are installed in the same directory

$exe=“.exe”  
}  
$ret=0  
if (Test-Path “$basedir/node$exe”) {  
& “$basedir/node$exe” “$basedir/node\_modules/ghost-cli/bin/ghost” $args  
$ret=$LASTEXITCODE  
} else {  
& “node$exe” “$basedir/node\_modules/ghost-cli/bin/ghost” $args  
$ret=$LASTEXITCODE  
}  
exit $ret

and when try ghost start  
PS E:\ghost\> ghost start  
Working directory is not a recognisable Ghost installation.

‫‪adolf‬‏ \<‪[midiaadeli12@gmail.com](mailto:midiaadeli12@gmail.com)‬‏\> در تاریخ پنجشنبه ۲۸ ژانویهٔ ۲۰۲۱ ساعت ۱:۲۰ نوشت:‬

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [January 28, 2021, 4:06pm UTC](https://forum.ghost.org/t/a-systemerror-occurred/19790/7 "2021-01-28T16:06:37Z")

</div>

If you run `ghost install` with a `--dir` flag, every other command (stop, start, update, etc.) has to be run _with the same flag_, or in the install directory.

If you’re seeing the `knex` error, try running `ghost update --force` as a workaround
