mably / lncli-web

Light-weight web client for the lnd daemon written in NodeJS / Angular.
https://github.com/lightningnetwork/lnd
GNU Affero General Public License v3.0
184 stars 58 forks source link

npm install fail #233

Open ctow123 opened 2 years ago

ctow123 commented 2 years ago

trying to follow https://dev.lightning.community/tutorial/02-web-client/index.html and can't even get npm install to work ... sigh I think u need to switch from grpc to @grpc/grpc-js

connormbp@connorMBP lncli-web % npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated core-js@2.5.7: core-js@<3.4 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 WARN deprecated grpc@1.24.9: This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead. npm ERR! code 1 npm ERR! path /Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/ursa npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! CXX(target) Release/obj.target/ursaNative/src/ursaNative.o npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@17.4.0 | darwin | x64 npm ERR! gyp info find Python using Python version 3.7.12 found at "/usr/local/opt/python@3.7/bin/python3.7" npm ERR! gyp info spawn /usr/local/opt/python@3.7/bin/python3.7 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/connormbp/go/src/github.com/mably/lncli-web/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/connormbp/go/src/github.com/mably/lncli-web/node_modules/ursa/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/connormbp/Library/Caches/node-gyp/17.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/connormbp/Library/Caches/node-gyp/17.4.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/connormbp/Library/Caches/node-gyp/17.4.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/ursa', 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! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../src/ursaNative.cc:3: npm ERR! In file included from ../src/ursaNative.h:13: npm ERR! In file included from /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/openssl/rsa.h:14: npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/openssl/macros.h:155:4: error: "OPENSSL_API_COMPAT expresses an impossible API compatibility level" npm ERR! # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" npm ERR! ^ npm ERR! ../src/ursaNative.cc:543:32: error: too few arguments to function call, single argument 'isolate' was not specified npm ERR! int length = str->Utf8Length(); npm ERR! ~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-primitive.h:132:7: note: 'Utf8Length' declared here npm ERR! int Utf8Length(Isolate isolate) const; npm ERR! ^ npm ERR! ../src/ursaNative.cc:553:18: error: cannot initialize a parameter of type 'v8::Isolate ' with an lvalue of type 'char ' npm ERR! str->WriteUtf8(result, length + 1); npm ERR! ^~ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-primitive.h:192:26: note: passing argument to parameter 'isolate' here npm ERR! int WriteUtf8(Isolate isolate, char* buffer, int length = -1, npm ERR! ^ npm ERR! ../src/ursaNative.cc:690:68: error: too few arguments to function call, single argument 'context' was not specified npm ERR! target->Set(NanNew("RsaWrap").ToLocalChecked(), tpl->GetFunction()); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-template.h:499:46: note: 'GetFunction' declared here npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction( npm ERR! ^ npm ERR! ../src/ursaNative.cc:691:38: error: too few arguments to function call, single argument 'context' was not specified npm ERR! constructor.Reset(tpl->GetFunction()); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-template.h:499:46: note: 'GetFunction' declared here npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction( npm ERR! ^ npm ERR! ../src/ursaNative.cc:693:104: error: too few arguments to function call, single argument 'context' was not specified npm ERR! target->Set(NanNew("textToNid").ToLocalChecked(), Nan::New(TextToNid)->GetFunction()); npm ERR! ~~~~~~~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-template.h:499:46: note: 'GetFunction' declared here npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction( npm ERR! ^ npm ERR! ../src/ursaNative.cc:866:42: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int modulusBits = args[0]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:867:39: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int exponent = args[1]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1103:38: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int padding = args[1]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1161:38: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int padding = args[1]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1218:38: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int padding = args[1]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1272:38: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int padding = args[1]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1411:34: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int nid = args[0]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1477:34: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int nid = args[0]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1554:34: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int nid = args[0]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1584:35: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int sLen = args[2]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1627:34: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int nid = args[0]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! ../src/ursaNative.cc:1674:35: error: too few arguments to function call, single argument 'context' was not specified npm ERR! int sLen = args[3]->Uint32Value(); npm ERR! ~~~~ ^ npm ERR! /Users/connormbp/Library/Caches/node-gyp/17.4.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here npm ERR! V8_WARN_UNUSED_RESULT Maybe Uint32Value( npm ERR! ^ npm ERR! 18 errors generated. npm ERR! make: *** [Release/obj.target/ursaNative/src/ursaNative.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 (/Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Darwin 20.6.0 npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /Users/connormbp/go/src/github.com/mably/lncli-web/node_modules/ursa npm ERR! gyp ERR! node -v v17.4.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok

mably commented 2 years ago

I sadly don't have time to maintain this project anymore.

I accidentally merged a few security updates which seem to be incompatible with current codebase.

Try going back a few commits.

It would be even better if you could suggest a fix to the problem. MRs welcomed.

ctow123 commented 2 years ago

thanks for the heads up, working on a new web UI that has a simpler dependency graph. npm/node/ and angular are notorious for dependency hell imo

POLIMED commented 1 year ago

thanks for the heads up, working on a new web UI that has a simpler dependency graph. npm/node/ and angular are notorious for dependency hell imo

Is the new web UI ready?