Unable to start and update Ghost Locall on Windows 10

I’m trying to initialize Ghost locally; however, it returns the following error message:

Message: Ghost was able to start, but errored during boot with: Knex: run
$ npm install sqlite3 --save
Cannot find module 'D:\projects\euaggelion\versions\5.70.0\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-ia32\node_sqlite3.node'
Require stack:
D:\projects\euaggelion\versions\5.70.0\node_modules\sqlite3\lib\sqlite3-binding.js
D:\projects\euaggelion\versions\5.70.0\node_modules\sqlite3\lib\sqlite3.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\lib\dialects\sqlite3\index.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\lib\dialects\index.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\lib\knex-builder\internal\config-resolver.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\lib\knex-builder\Knex.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\lib\index.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex\knex.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex-migrator\lib\database.js
D:\projects\euaggelion\versions\5.70.0\node_modules\knex-migrator\lib\index.js
D:\projects\euaggelion\versions\5.70.0\core\server\data\db\DatabaseStateManager.js
D:\projects\euaggelion\versions\5.70.0\core\boot.js
D:\projects\euaggelion\versions\5.70.0\ghost.js
D:\projects\euaggelion\versions\5.70.0\index.js

I tried to execute the instructions from another topic; however, I continue to face the same issue.

Debug Information:

OS: Microsoft Windows 10 Home Single Language, v10.0.19045
Node Version: v18.12.1
Ghost Version: 5.70.0
Ghost-CLI Version: 1.25.3
Environment: development
Command: ‘ghost start’

When I try to update to the latest version, it returns the following error:

Message: Command failed: yarn install --no-emoji --no-progress
warning ..\..\package.json: No license field
warning ghost@5.79.1: The engine "cli" appears to be invalid.
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.27.0"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.31"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.29.4"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.29.4"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@0.5.34"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.29.3"
warning Resolution field "@tryghost/errors@1.2.26" is incompatible with requested version "@tryghost/errors@^1.2.27"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
warning Resolution field "@tryghost/errors@1.2.26" is incompatible with requested version "@tryghost/errors@^1.2.27"
warning Resolution field "@tryghost/errors@1.2.26" is incompatible with requested version "@tryghost/errors@^1.2.27"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/errors@1.2.26" is incompatible with requested version "@tryghost/errors@1.3.0"
warning Resolution field "@tryghost/logging@2.4.8" is incompatible with requested version "@tryghost/logging@2.4.10"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning " > bookshelf@1.2.0" has incorrect peer dependency "knex@>=0.15.0 <0.22.0".
warning Error running install script for optional dependency: "D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@newrelic\\native-metrics: Command failed.
Exit code: 1
Command: node ./lib/pre-build.js install native_metrics
Arguments:
Directory: D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@newrelic\\native-metrics
Output:
============================================================================
Attempting install in native-metrics module. Please note that this is an
OPTIONAL dependency, and any resultant errors in this process will not
affect the general performance of the New Relic agent, but event loop and
garbage collection metrics will not be collected for the Node VMs page.
============================================================================

Download error: No pre-built artifacts for your OS/architecture., falling back to build
> C:\\Program Files (x86)\\nodejs\\node.exe D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\bin\\node-gyp.js clean configure
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@18.12.1 | win32 | ia32
gyp info find Python using Python version 3.12.0 found at \"C:\\Python312\\python.exe\"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.10.31410.357) found at:
gyp ERR! find VS \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\"
gyp ERR! find VS - found \"Visual Studio C++ core features\"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the \"Desktop development with C++\" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:122:47)
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:363:14)
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:71:14
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:384:16
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\util.js:54:7
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command \"C:\\\\Program Files (x86)\\\\nodejs\\\\node.exe\" \"D:\\\\projects\\\\euaggelion\\\\versions\\\\5.79.1\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"clean\" \"configure\"
gyp ERR! cwd D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@newrelic\\native-metrics
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
Failed to execute native-metrics install: Command exited with non-zero code: 1

Failed install of this OPTIONAL dependency will not impact the general performance
of the New Relic Node.js agent. You may safely run in production. Your application
will be missing event loop and garbage collection metrics for the Node VMs page.
To capture Node event loop and GC metrics, please resolve issues and reinstall."
warning Error running install script for optional dependency: "D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@contrast\\fn-inspect: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@contrast\\fn-inspect
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@18.12.1 | win32 | ia32
gyp info find Python using Python version 3.12.0 found at \"C:\\Python312\\python.exe\"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.10.31410.357) found at:
gyp ERR! find VS \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\"
gyp ERR! find VS - found \"Visual Studio C++ core features\"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the \"Desktop development with C++\" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:122:47)
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:363:14)
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:71:14
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\find-visualstudio.js:384:16
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\util.js:54:7
gyp ERR! stack     at D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\node-gyp\\lib\\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command \"C:\\\\Program Files (x86)\\\\nodejs\\\\node.exe\" \"D:\\\\projects\\\\euaggelion\\\\versions\\\\5.79.1\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\"
gyp ERR! cwd D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\@contrast\\fn-inspect
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok"
error D:\projects\euaggelion\versions\5.79.1\node_modules\re2: Command failed.
Exit code: 1
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || npm run rebuild
Arguments:
Directory: D:\projects\euaggelion\versions\5.79.1\node_modules\re2
Output:
Trying https://github.com/uhop/node-re2/releases/download/1.20.3/win32-ia32-108.br ...
Trying https://github.com/uhop/node-re2/releases/download/1.20.3/win32-ia32-108.gz ...
Building locally ...

> re2@1.20.3 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@9.4.0
gyp info using node@18.12.1 | win32 | ia32
gyp info find Python using Python version 3.12.0 found at "C:\Python312\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.10.31410.357) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:401:16
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\re2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\projects\euaggelion\versions\5.79.1\node_modules\re2
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.12.1

> re2@1.20.3 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@9.4.0
gyp info using node@18.12.1 | win32 | ia32
gyp info find Python using Python version 3.12.0 found at "C:\Python312\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS checking VS2019 (16.10.31410.357) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\find-visualstudio.js:401:16
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at D:\projects\euaggelion\versions\5.79.1\node_modules\re2\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "D:\\projects\\euaggelion\\versions\\5.79.1\\node_modules\\re2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\projects\euaggelion\versions\5.79.1\node_modules\re2
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok

yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info This module is OPTIONAL, you can safely ignore this error
info This module is OPTIONAL, you can safely ignore this error
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Debug Information:
OS: Microsoft Windows 10 Home Single Language, v10.0.19045
Node Version: v18.12.1
Ghost Version: 5.70.0
Ghost-CLI Version: 1.25.3
Environment: development
Command: ‘ghost update’

As suggested in another topic, I chose to use WSL2 to work with Ghost locally

1 Like