Hi everybody,
I’m facing problems installing Ghost locally on my Mac. I have looked in the forum and on the internet, and the solutions I found didn’t work. I keep getting the same error messages when I try to install Ghost.
OS: macOS, v12.5
npm installed version: 8.1.0
node installed version: v16.13.0
yarn installed version: 1.22.19
Ghost-CLI Version: 1.24.0
When I run the command: ghost install local
, it shows this:
✔ Checking system Node.js version - found v16.13.0
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✖ Downloading and installing Ghost v5.46.0
A ProcessError occurred.
Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@5.46.0: The engine "cli" appears to be invalid.
warning Resolution field "@elastic/elasticsearch@8.5.0" is incompatible with requested version "@elastic/elasticsearch@8.6.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "@tryghost/errors@1.2.24" is incompatible with requested version "@tryghost/errors@1.2.21"
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 "@tryghost/errors@1.2.24" is incompatible with requested version "@tryghost/errors@1.2.21"
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 "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.27.0"
warning Resolution field "@tryghost/errors@1.2.24" is incompatible with requested version "@tryghost/errors@1.2.23"
warning Resolution field "@tryghost/logging@2.4.4" is incompatible with requested version "@tryghost/logging@2.4.3"
warning Resolution field "@tryghost/errors@1.2.24" is incompatible with requested version "@tryghost/errors@1.2.23"
warning Resolution field "@tryghost/logging@2.4.4" is incompatible with requested version "@tryghost/logging@2.4.3"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning "@tryghost/kg-lexical-html-renderer > @lexical/rich-text@0.9.0" has unmet peer dependency "@lexical/selection@0.9.0".
warning "@tryghost/kg-lexical-html-renderer > @lexical/rich-text@0.9.0" has unmet peer dependency "@lexical/utils@0.9.0".
warning " > bookshelf@1.2.0" has incorrect peer dependency "knex@>=0.15.0 <0.22.0".
error /Users/username/Desktop/forfun/local/versions/5.46.0/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: /Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2
Output:
Trying https://github.com/uhop/node-re2/releases/download/1.18.0/darwin-arm64-93.br ...
Trying https://github.com/uhop/node-re2/releases/download/1.18.0/darwin-arm64-93.gz ...
Building locally ...
> re2@1.18.0 rebuild
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@16.13.0 | darwin | arm64
gyp info find Python using Python version 3.9.5 found at "/usr/local/bin/python3"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/16.13.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))).
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok
node:internal/process/promises:246
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'
}
> re2@1.18.0 rebuild
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@16.13.0 | darwin | arm64
gyp info find Python using Python version 3.9.5 found at "/usr/local/bin/python3"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/username/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/16.13.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))).
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/username/Desktop/forfun/local/versions/5.46.0/node_modules/re2
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v9.3.1
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 Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exit code: 1
Debug Information:
OS: macOS, v12.5
Node Version: v16.13.0
Ghost-CLI Version: 1.24.0
Environment: development
Command: 'ghost install local'
Additional log info available in: /Users/username/.ghost/logs/ghost-cli-debug-2023-04-30T17_32_58_270Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
Any help would be greatly appreciated.
Thanks a lot!