Installation Error: "Process Error" "Exit code: ENOENT"

Trying to install ghost; It’s not working. See image below


Thanks!

Try installing yarn.

Incidentally, please paste code into the thread for easier reading, and a better chance of someone helping you in future.

Tried, new error this time. Thanks for the help.

Debug Information:
    OS: Microsoft Windows 11 Home, v10.0.22000
    Node Version: v16.15.1
    Ghost-CLI Version: 1.21.0
    Environment: development
    Command: 'ghost install local'
Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@5.2.4: 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-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
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-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.3"
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.27.0"
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 " > mock-knex@0.4.9" has incorrect peer dependency "knex@> 0.8 < 2.1".
error C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\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: C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
Output:
Trying https://github.com/uhop/node-re2/releases/download/1.17.4/win32-ia32-93.br ...
Trying https://github.com/uhop/node-re2/releases/download/1.17.4/win32-ia32-93.gz ...
Building locally ...
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.15.1 | win32 | ia32
gyp info find Python using Python version 3.10.5 found at "C:\Python310\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 VS2022 (17.2.32616.157) found at:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS checking VS2019 (16.11.32413.511) 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 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Sam Cheng\\Desktop\\ghost-site\\versions\\5.2.4\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 
node:internal/process/promises:279
            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'
}
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.15.1 | win32 | ia32
gyp info find Python using Python version 3.10.5 found at "C:\Python310\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 VS2022 (17.2.32616.157) found at:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS checking VS2019 (16.11.32413.511) 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 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Sam Cheng\\Desktop\\ghost-site\\versions\\5.2.4\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok

yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Exit code: 1

--------------- stdout ---------------
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


--------------- stderr ---------------
warning ghost@5.2.4: 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-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
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-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.3"
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.27.0"
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 " > mock-knex@0.4.9" has incorrect peer dependency "knex@> 0.8 < 2.1".
error C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\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: C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
Output:
Trying https://github.com/uhop/node-re2/releases/download/1.17.4/win32-ia32-93.br ...
Trying https://github.com/uhop/node-re2/releases/download/1.17.4/win32-ia32-93.gz ...
Building locally ...
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.15.1 | win32 | ia32
gyp info find Python using Python version 3.10.5 found at "C:\Python310\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 VS2022 (17.2.32616.157) found at:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS checking VS2019 (16.11.32413.511) 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 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Sam Cheng\\Desktop\\ghost-site\\versions\\5.2.4\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 
node:internal/process/promises:279
            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'
}
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.15.1 | win32 | ia32
gyp info find Python using Python version 3.10.5 found at "C:\Python310\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 VS2022 (17.2.32616.157) found at:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS checking VS2019 (16.11.32413.511) 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 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Sam Cheng\\Desktop\\ghost-site\\versions\\5.2.4\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Sam Cheng\Desktop\ghost-site\versions\5.2.4\node_modules\re2
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok

See this post…