question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error installing package using yarn instead of npm

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sanketdhoblecommented, Sep 4, 2018

yarn run upgrade && yarn install --force after doing this. I get the error.

0reactions
jheckingcommented, Dec 10, 2018

I don’t want to rename the PREFIX variable, because it might break other users’ workflows. So setting DOWNLOAD = 1 is the recommended work-around for now. Will consider this for a future 4.0 release, whenever that might happen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing package using npm instead of yarn
In this project, I am installing dependencies using npm. If I install dependencies using yarn its working perfectly fine. I am not getting...
Read more >
Error Codes | Yarn - Package Manager
A list of Yarn's error codes with detailed explanations. ... Please relinquish one character and use the YNX prefix (ex YNX001 ) instead...
Read more >
How To Install and Use the Yarn Package Manager for Node.js
First you install the yarn command globally, then you use the global yarn command to install a specific local version of Yarn into...
Read more >
How to Force Use Yarn or NPM - freeCodeCamp
With this method, you make sure everyone will. ... tries to use npm instead of yarn , they will receive an error ......
Read more >
Common errors | npm Docs
On Mac or Linux, reinstall npm. · Windows: If you're on Windows and you have a broken installation, the easiest thing to do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found