Reputation: 418
I'm trying to install Caliper from NPM with version 7.19.1, following the document from https://hyperledger.github.io/caliper/v0.4.2/installing-caliper/#versioning-semantics
When I run the command
npm install --only=prod @hyperledger/[email protected]
It turns:
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated @web3-js/[email protected]: This package is deprecated, for a pure JS implementation please use scrypt-js
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: stable api reached
npm WARN deprecated @web3-js/[email protected]: The branch for this fork was merged upstream, please update your package to [email protected]
npm WARN deprecated @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated [email protected]: New versions are published within new scoped package name format @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/keccak/src/addon.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/local/opt/[email protected]/bin/python3.9"
npm ERR! (node:18836) [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/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/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/zhuxingyu/vscode/caliper-workspace/node_modules/keccak/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/zhuxingyu/Library/Caches/node-gyp/16.4.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/zhuxingyu/Library/Caches/node-gyp/16.4.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak',
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! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/addon.cc:37:47: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned int rate = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:38:51: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned int capacity = info[1]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:56:48: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! unsigned char bits = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:64:43: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! size_t length = info[0]->IntegerValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3086:40: note: 'IntegerValue' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! ^
npm ERR! ../src/addon.cc:75:82: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! KeccakWrapper* to = Nan::ObjectWrap::Unwrap<KeccakWrapper>(info[0]->ToObject());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/zhuxingyu/Library/Caches/node-gyp/16.4.0/include/node/v8.h:3045:44: note: 'ToObject' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^
npm ERR! 5 errors generated.
npm ERR! make: *** [Release/obj.target/keccak/src/addon.o] Error 1
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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/zhuxingyu/vscode/caliper-workspace/node_modules/keccak
npm ERR! gyp ERR! node -v v16.4.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/zhuxingyu/.npm/_logs/2021-07-02T08_03_17_038Z-debug.log
I already tried:
And I think my npm is already up-to-date.
Does anyone ever solve the problem like this? I'm not familiar with the npm tools. Thanks in advance.
Upvotes: 1
Views: 587
Reputation: 418
Solved: I' m using mirror from Qinghua University and part of it is outdated. So I change my mirror back to official, and it's fixed.
npm config set registry http://www.npmjs.org
Upvotes: 0