Closed
Description
- Node Version: v16.5.0 or v 14
- Platform: Mac OS
- Compiler:
- Module: npm install
Verbose output (from npm or node-gyp):
15598 verbose node v16.5.0
15599 verbose npm v7.19.1
15600 error code 1
15601 error path <path>/usage
15602 error command failed
15603 error command sh -c node-gyp rebuild
15604 error CXX(target) Release/obj.target/sysinfo/src/binding.o
15605 error gyp info it worked if it ends with ok
15605 error gyp info using node-gyp@7.1.2
15605 error gyp info using node@16.5.0 | darwin | x64
15605 error gyp info find Python using Python version 3.8.2 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
15605 error (node:45062) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
15605 error (Use `node --trace-deprecation ...` to show where the warning was created)
15605 error gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
15605 error gyp info spawn args [
15605 error gyp info spawn args '/Users/<name>/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
15605 error gyp info spawn args 'binding.gyp',
15605 error gyp info spawn args '-f',
15605 error gyp info spawn args 'make',
15605 error gyp info spawn args '-I',
15605 error gyp info spawn args '<path>/node_modules/usage/build/config.gypi',
15605 error gyp info spawn args '-I',
15605 error gyp info spawn args '/Users/rupesh/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
15605 error gyp info spawn args '-I',
15605 error gyp info spawn args '/<path>/Library/Caches/node-gyp/16.5.0/include/node/common.gypi',
15605 error gyp info spawn args '-Dlibrary=shared_library',
15605 error gyp info spawn args '-Dvisibility=default',
15605 error gyp info spawn args '-Dnode_root_dir=/Users/rupesh/Library/Caches/node-gyp/16.5.0',
15605 error gyp info spawn args '-Dnode_gyp_dir=/<path>.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp',
15605 error gyp info spawn args '-Dnode_lib_file=/Users/rupesh/Library/Caches/node-gyp/16.5.0/<(target_arch)/node.lib',
15605 error gyp info spawn args '-Dmodule_root_dir=/Users/rupesh/code/<dir>/node_modules/usage',
15605 error gyp info spawn args '-Dnode_engine=v8',
15605 error gyp info spawn args '--depth=.',
15605 error gyp info spawn args '--no-parallel',
15605 error gyp info spawn args '--generator-output',
15605 error gyp info spawn args 'build',
15605 error gyp info spawn args '-Goutput_dir=.'
15605 error gyp info spawn args ]
15605 error gyp info spawn make
15605 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
15605 error ../src/binding.cpp:16:12: error: no matching member function for call to 'Set'
15605 error exports->Set(Nan::New<String>("OS").ToLocalChecked(), Nan::New<String>(OS).ToLocalChecked());
15605 error ~~~~~~~~~^~~
15605 error /Users/<name>/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3945:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
15605 error V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
15605 error ^
15605 error /Users/<path>/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
15605 error V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
15605 error ^
15605 error 1 error generated.
15605 error make: *** [Release/obj.target/sysinfo/src/binding.o] Error 1
15605 error gyp ERR! build error
15605 error gyp ERR! stack Error: `make` failed with exit code: 2
Not able to install node-gyp, if I am downgrading node to 12 it's working
Update 1 - on (22/07/21)
context - Currently using node 10.x in the project, updating the dependencies as 10 is EOL
Steps did so far -
- Removed the
node_modules
andlock
files - updated yarn global upgrade
- updated engines in
package.json
from 10.x to 14/16 and npm as well - tried with
npm install
in the project directory