sss-node icon indicating copy to clipboard operation
sss-node copied to clipboard

getting error while installing with npm

Open vikaskumr opened this issue 4 years ago • 6 comments

I have ran the command npm install --save dsprenkels/sss-node#release-0.x I am getting this error ./shamirsecretsharing.cc:7:12: fatal error: sss/sss.h: No such file or directory npm ERR! 7 | #include "sss/sss.h" npm ERR! | ^~~~~~~~~~~ npm ERR! compilation terminated.

can anyone please help

vikaskumr avatar Apr 21 '21 06:04 vikaskumr

Oh boy. It seems like nowadays, node-gyp does not initialize and/or update the git submodules anymore while installing. I am guessing that we should be able to do this manually.

dsprenkels avatar Apr 21 '21 10:04 dsprenkels

@vikaskumr For reference, can you report for me the output of node-gyp --version?

dsprenkels avatar Apr 21 '21 10:04 dsprenkels

@dsprenkels my node-gyp version is v8.0.0. Can you please let me know what I should do in this situation as I am facing this issue in another GitHub repo also which is using your library internally to implement social recovery

vikaskumr avatar Apr 26 '21 15:04 vikaskumr

@vikaskumr Apparently, npm does not clone git repositories recursively anymore, and they won't support scripts that do this during the installation.

A solution could be to manually copy-paste all the submodule files in every release. Though for the time being, I think this you could solve this by adding the complete repo as a submodule, and checking it out recursively. Then node-gyp will be able to find the files.

See also: https://stackoverflow.com/questions/23527393/can-npm-install-the-git-folder-for-dependencies/28559920#28559920

dsprenkels avatar May 03 '21 08:05 dsprenkels

Hey @dsprenkels, any chance this repo could become an official npm package?

sunknudsen avatar Jun 28 '22 15:06 sunknudsen

@sunknudsen On the one hand I could, but on the other hand I am realizing that I not really active in maintaining it anymore. :(

Moreover, for me to publish this package on NPM, I would really like to have at least one co-maintainer that I am acquainted with, and who knows the code.

dsprenkels avatar Jun 30 '22 11:06 dsprenkels