A SystemError occurred

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 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

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 https://ghost.org/docs/api/ghost-cli/ for troubleshooting.

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

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 folderC8apture

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?

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‬‏> در تاریخ چهارشنبه ۲۷ ژانویهٔ ۲۰۲۱ ساعت ۱۴:۱۵ نوشت:‬

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/ 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/ 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‬‏> در تاریخ پنجشنبه ۲۸ ژانویهٔ ۲۰۲۱ ساعت ۱:۲۰ نوشت:‬

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