If you’re switching to version 1.0.0, from v0.9.1, you may see the following error:
mrm@m1 photostructure-for-servers % ./start.sh
No local changes to save
Already up to date.
Cleaning up prior builds before recompiling...
Need to install the following packages:
yarn
Ok to proceed? (y) y
yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info exiftool-vendored.exe@12.25.0: The platform "darwin" is incompatible with this module.
info "exiftool-vendored.exe@12.25.0" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
[1/2] ⠈ better-sqlite3
error /Users/mrm/photostructure-for-servers/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/mrm/photostructure-for-servers/node_modules/sharp
Output:
sharp: Detected globally-installed libvips v8.10.6
sharp: Building from source via node-gyp
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.2.0 | darwin | arm64
gyp info find Python using Python version 3.9.5 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
(node:21413) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ... to show where the warning was created)
gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
gyp info spawn args [
gyp info spawn args '/Users/mrm/.nvm/versions/node/v16.2.0/lib/node_modules/npm/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/mrm/photostructure-for-servers/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/mrm/.nvm/versions/node/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/mrm/Library/Caches/node-gyp/16.2.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/mrm/Library/Caches/node-gyp/16.2.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/mrm/.nvm/versions/node/v16.2.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/mrm/Library/Caches/node-gyp/16.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/mrm/photostructure-for-servers/node_modules/sharp',
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 ]
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
Package 'OpenEXR', required by 'vips', not found
gyp: Call to 'PKG_CONFIG_PATH="/usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --cflags-only-I vips-cpp vips glib-2.0 | sed s\/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/mrm/.nvm/versions/node/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:365:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/mrm/.nvm/versions/node/v16.2.0/bin/node" "/Users/mrm/.nvm/versions/node/v16.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mrm/photostructure-for-servers/node_modules/sharp
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
There are several things to check:
-
Make sure homebrew is up to date. Run
brew upgrade
. -
Uninstall the vips library. Run
brew uninstall vips
. -
Make sure you’re running Node.js version 16.2.0.
If you installed node withnvm
, run the following:
nvm install 16
nvm alias default 16
nvm use 16
nvm uninstall 15 # < optional
- Make sure you’re running PhotoStructure v1.0.0 or later. As of today, this requires using the
beta
branch. When v1.0.0 is released, you can switch back to themain
branch.
Switch to the beta branch by running the following:
cd ~/photostructure-for-servers
git stash -u
git fetch
git checkout beta
At this point, ./start.sh
should work:
mrm@m1 photostructure-for-servers % ./start.sh
No local changes to save
Already up to date.
yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info exiftool-vendored.exe@12.25.0: The platform "darwin" is incompatible with this module.
info "exiftool-vendored.exe@12.25.0" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
✨ Done in 20.96s.
PhotoStructure is ready: <http://localhost:1787/>
Still have problems? Reply to this thread and we’ll get it sorted.