Closed davidyuk closed 9 months ago
$ node -v
v16.16.0
$ npm -v
8.10.0
$ sw_vers
ProductName: macOS
ProductVersion: 12.4
BuildVersion: 21F79
$ npm i
npm ERR! code 1
npm ERR! path /Users/denis/Documents/superhero-wallet/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.12.2
npm ERR! sharp: Building from source via node-gyp
npm ERR! make: Entering directory '/Users/denis/Documents/superhero-wallet/node_modules/sharp/build'
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR! LIBTOOL-STATIC Release/nothing.a
npm ERR! make: Leaving directory '/Users/denis/Documents/superhero-wallet/node_modules/sharp/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.16.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! (node:98170) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/denis/Documents/superhero-wallet/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/denis/Documents/superhero-wallet/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/denis/Documents/superhero-wallet/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/denis/Library/Caches/node-gyp/16.16.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/denis/Library/Caches/node-gyp/16.16.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/denis/Documents/superhero-wallet/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/denis/Library/Caches/node-gyp/16.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/denis/Documents/superhero-wallet/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! env: python: No such file or directory
npm ERR! make: *** [../node-addon-api/nothing.target.mk:160: Release/nothing.a] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/denis/Documents/superhero-wallet/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node@16/16.16.0/bin/node" "/Users/denis/Documents/superhero-wallet/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/denis/Documents/superhero-wallet/node_modules/sharp
npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/denis/.npm/_logs/2022-07-21T14_10_13_058Z-debug-0.log
$ python
zsh: command not found: python
python2 is deprecated and it is quite tricky to install in macOS: https://stackoverflow.com/questions/60298514/how-to-reinstall-python2-from-homebrew
Potentially, it can be fixed by
npm i github:ionic-team/capacitor-assets#dependabot/npm_and_yarn/sharp-0.30.7 -D
but seems even the latest version of sharp
is not copatible with node@16.16, it triggers the build process that depends on python :/
works fine on
$ node -v
v20.11.0
$ npm -v
10.2.4
is it a problem with cordova-plugin-openwith package?