aerospike-client-nodejs: Error installing package using yarn instead of npm
I have package.json with "aerospike": "^2.7.2"
.
I am using mac.
Earlier checks [✓] /usr/local/lib/libaerospike.a
were getting failed so
I installed c client pkg com.aerospike.client.c.4.1.4
on mac as well.
Now that error was gone but then following error arise.
When I run command yarn run upgrade
it gives error on aerospike module as follows.
error /Users/sanketd/Documents/testproject/node_modules/aerospike: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: /Users/sanketd/Documents/testproject/node_modules/aerospike Output: gyp info it worked if it ends with ok gyp info using node-gyp@3.8.0 gyp info using node@8.11.4 | darwin | x64 gyp info spawn /usr/bin/python gyp info spawn args [ ‘/usr/local/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/sanketd/Documents/testproject/node_modules/aerospike/build/config.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/Users/sanketd/.node-gyp/8.11.4/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/sanketd/.node-gyp/8.11.4’, gyp info spawn args ‘-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp’, gyp info spawn args ‘-Dnode_lib_file=/Users/sanketd/.node-gyp/8.11.4/<(target_arch)/node.lib’, gyp info spawn args ‘-Dmodule_root_dir=/Users/sanketd/Documents/testproject/node_modules/aerospike’, 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 make gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ] TOUCH e57f3d8558e9d79f83a1d12ee621e0adf8d6bb11.intermediate ACTION binding_gyp_aerospike_client_c_target_run_scripts_aerospike_client_c_sh e57f3d8558e9d79f83a1d12ee621e0adf8d6bb11.intermediate
CHECK [✓] /usr/local/lib/libaerospike.a [✓] /usr/local/include/aerospike/aerospike.h
TOUCH Release/obj.target/aerospike-client-c.stamp
CXX(target) Release/obj.target/aerospike/src/main/aerospike.o
CXX(target) Release/obj.target/aerospike/src/main/client.o
CXX(target) Release/obj.target/aerospike/src/main/config.o
CXX(target) Release/obj.target/aerospike/src/main/events.o
…/src/main/events.cc:48:13: error: unknown type name ‘as_cluster_event’; did you mean ‘as_cluster_s’?
void push(as_cluster_event *event) {
^~~~~~~~~~~~~~~~
as_cluster_s
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: ‘as_cluster_s’ declared here
struct as_cluster_s;
^
…/src/main/events.cc:71:24: error: unknown type name ‘as_cluster_event’; did you mean ‘as_cluster_s’?
Local<Value> convert(as_cluster_event *event) {
^~~~~~~~~~~~~~~~
as_cluster_s
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: ‘as_cluster_s’ declared here
struct as_cluster_s;
^
…/src/main/events.cc:43:34: error: unknown type name ‘as_cluster_event’; did you mean ‘as_cluster_s’?
cf_queue_init(&events, sizeof(as_cluster_event), 4, true);
^~~~~~~~~~~~~~~~
as_cluster_s
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: ‘as_cluster_s’ declared here
struct as_cluster_s;
^
…/src/main/events.cc:43:27: error: invalid application of ‘sizeof’ to an incomplete type ‘as_cluster_s’
cf_queue_init(&events, sizeof(as_cluster_event), 4, true);
^ ~~~~~~~~~~~~~~~~~~
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:51:11: error: member access into incomplete type ‘as_cluster_s’
event->type, event->node_name, event->node_address);
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:51:24: error: member access into incomplete type ‘as_cluster_s’
event->type, event->node_name, event->node_address);
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:51:42: error: member access into incomplete type ‘as_cluster_s’
event->type, event->node_name, event->node_address);
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:55:4: error: unknown type name ‘as_cluster_event’; did you mean ‘as_cluster_s’?
as_cluster_event event;
^~~~~~~~~~~~~~~~
as_cluster_s
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: ‘as_cluster_s’ declared here
struct as_cluster_s;
^
…/src/main/events.cc:55:21: error: variable has incomplete type ‘as_cluster_s’
as_cluster_event event;
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:75:17: error: member access into incomplete type ‘as_cluster_s’
switch (event->type) {
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:89:20: error: member access into incomplete type ‘as_cluster_s’
Nan::New(event->node_name).ToLocalChecked());
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:91:20: error: member access into incomplete type ‘as_cluster_s’
Nan::New(event->node_address).ToLocalChecked());
^
…/aerospike-client-c/include/aerospike/aerospike.h:71:8: note: forward declaration of ‘as_cluster_s’
struct as_cluster_s;
^
…/src/main/events.cc:104:36: error: unknown type name ‘as_cluster_event’
static void cluster_event_callback(as_cluster_event *event);
^
…/src/main/events.cc:123:10: error: no member named ‘event_callback_udata’ in ‘as_config_s’
config->event_callback_udata = (void *) handle;
~~~~~~ ^
…/src/main/events.cc:124:10: error: no member named ‘event_callback’ in ‘as_config_s’
config->event_callback = cluster_event_callback;
~~~~~~ ^
…/src/main/events.cc:131:46: error: no member named ‘event_callback_udata’ in ‘as_config_s’
uv_handle_t *async = (uv_handle_t *)config->event_callback_udata;
~~~~~~ ^
…/src/main/events.cc:146:24: error: unknown type name ‘as_cluster_event’
cluster_event_callback(as_cluster_event *event)
^
17 errors generated.
make: *** [Release/obj.target/aerospike/src/main/events.o] Error 1
rm e57f3d8558e9d79f83a1d12ee621e0adf8d6bb11.intermediate
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /Users/sanketd/Documents/testproject/node_modules/aerospike
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.0
I am struck on this since 2 days trying to figure out what is going wrong. npm install aerospike
works fine.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (9 by maintainers)
yarn run upgrade && yarn install --force
after doing this. I get the error.