rgcl / webpay-nodejs

[Spanish/Chile] Módulo no oficial para integrar WebPay Plus en Node.js, con soporte para promesas.
GNU Lesser General Public License v3.0
93 stars 32 forks source link

Problemas al instalar librería, intenta instalar ursa y ejecuta node-gyp rebuild #13

Closed kattatzu closed 5 years ago

kattatzu commented 5 years ago

Hola chicos, excelente librería!!

tengo un problema, no logro instalarla en mi Mac con Node v11.6.0 y NPM v6.5.0, por lo que entiendo se usa una versión javascript de Ursa, sin embargo intenta compilar de igual forma esa librería.

Me podrían indicar que estoy haciendo mal, se los agradecería mucho.

npm install webpay-nodejs
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated ejs@2.3.4: Critical security bugs fixed in 2.5.5

> ursa@0.9.4 install /Users/kattatzu/sites/mktv/node_modules/ursa
> node-gyp rebuild

  CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
../src/ursaNative.cc:208:23: warning: 'Utf8Length' is deprecated: Use Isolate version instead [-Wdeprecated-declarations]
    int length = str->Utf8Length();
                      ^
/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2682:3: note: 'Utf8Length' has been explicitly marked deprecated here
  V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const);
  ^
...
14 warnings and 16 errors generated.
make: *** [Release/obj.target/ursaNative/src/ursaNative.o] Error 1
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 ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/kattatzu/sites/mktv/node_modules/ursa
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 (node_modules/ursa):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ webpay-nodejs@1.3.0
added 65 packages from 75 contributors and audited 16279 packages in 27.555s
found 4 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
morello-cl commented 5 years ago

Hola, 

Existe un fork de la librería, el cual utiliza "ursa" en su versión javascript

Saludos

Marco Orellana

Chief Technology Officer

F: +56232694723

http://www.somosinventiva.com/

Creando Entornos Inteligentes

---- On vie, 18 ene 2019 23:11:52 -0300 José Eduardo Ríos notifications@github.com wrote ----

Hola chicos, excelente librería!!

tengo un problema, no logro instalarla en mi Mac con Node v11.6.0 y NPM v6.5.0, por lo que entiendo se usa una versión javascript de Ursa, sin embargo intenta compilar de igual forma esa librería.

Me podrían indicar que estoy haciendo mal, se los agradecería mucho.

npm install webpay-nodejs

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

npm WARN deprecated ejs@2.3.4: Critical security bugs fixed in 2.5.5

ursa@0.9.4 install /Users/kattatzu/sites/mktv/node_modules/ursa

node-gyp rebuild

CXX(target) Release/obj.target/ursaNative/src/ursaNative.o

../src/ursaNative.cc:208:23: warning: 'Utf8Length' is deprecated: Use Isolate version instead [-Wdeprecated-declarations]

int length = str->Utf8Length();

                  ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2682:3: note: 'Utf8Length' has been explicitly marked deprecated here

V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:217:10: warning: 'WriteUtf8' is deprecated: Use Isolate* version [-Wdeprecated-declarations]

str->WriteUtf8(result, length + 1);

     ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2753:3: note: 'WriteUtf8' has been explicitly marked deprecated here

V8_DEPRECATED("Use Isolate* version",

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:389:13: error: member access into incomplete type 'RSA' (aka 'rsa_st')

obj->rsa->n = BN_bin2bn(data_n, n_length, NULL);

        ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:390:13: error: member access into incomplete type 'RSA' (aka 'rsa_st')

obj->rsa->e = BN_bin2bn(data_e, e_length, NULL);

        ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:407:35: error: member access into incomplete type 'RSA' (aka 'rsa_st')

if ((obj == NULL) || (obj->rsa->d != NULL)) {

                              ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:488:32: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int modulusBits = args[0]->Uint32Value();

                           ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:489:29: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int exponent = args[1]->Uint32Value();

                        ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:536:34: error: member access into incomplete type 'RSA' (aka 'rsa_st')

bignumToBuffer(args, obj->rsa->e);

                             ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:552:34: error: member access into incomplete type 'RSA' (aka 'rsa_st')

bignumToBuffer(args, obj->rsa->d);

                             ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:567:34: error: member access into incomplete type 'RSA' (aka 'rsa_st')

bignumToBuffer(args, obj->rsa->n);

                             ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:683:28: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int padding = args[1]->Uint32Value();

                       ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:730:28: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int padding = args[1]->Uint32Value();

                       ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:776:28: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int padding = args[1]->Uint32Value();

                       ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:822:28: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int padding = args[1]->Uint32Value();

                       ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:928:24: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int nid = args[0]->Uint32Value();

                   ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:982:24: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int nid = args[0]->Uint32Value();

                   ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:1044:24: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int nid = args[0]->Uint32Value();

                   ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:1065:25: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int sLen = args[2]->Uint32Value();

                    ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:1102:24: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int nid = args[0]->Uint32Value();

                   ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:1135:25: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]

int sLen = args[3]->Uint32Value();

                    ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here

V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);

^

/Users/kattatzu/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'

declarator attribute((deprecated(message)))

                        ^

../src/ursaNative.cc:1218:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->n = modulus;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1219:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->e = exponent;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1220:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->p = p;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1221:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->q = q;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1222:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->dmp1 = dp;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1223:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->dmq1 = dq;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1224:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->iqmp = inverseQ;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1225:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->d = d;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1270:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->n = modulus;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

../src/ursaNative.cc:1271:17: error: member access into incomplete type 'RSA' (aka 'rsa_st')

    obj->rsa->e = exponent;

            ^

/Users/kattatzu/.node-gyp/11.6.0/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of 'rsa_st'

typedef struct rsa_st RSA;

           ^

14 warnings and 16 errors generated.

make: *** [Release/obj.target/ursaNative/src/ursaNative.o] Error 1

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 ChildProcess.emit (events.js:188:13)

gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)

gyp ERR! System Darwin 18.2.0

gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /Users/kattatzu/sites/mktv/node_modules/ursa

gyp ERR! node -v v11.6.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 (node_modules/ursa):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 install: node-gyp rebuild

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 65 packages from 75 contributors and audited 16279 packages in 27.555s

found 4 low severity vulnerabilities

run npm audit fix to fix them, or npm audit for details

— You are receiving this because you are subscribed to this thread. Reply to this email directly, https://github.com/rgcl/webpay-nodejs/issues/13, or https://github.com/notifications/unsubscribe-auth/AC-9EfwVD7F6CpYbrWencNjA7bSMozJ5ks5vEn7ogaJpZM4aI6Ho.

kattatzu commented 5 years ago

Hola,  Existe un fork de la librería, el cual utiliza "ursa" en su versión javascript Saludos Marco Orellana

Gracias @morello-cl,

estuve revisando las dependencias y el problema es que Soap require URSA en su package.json, por eso intenta instalarlo, sabes cómo solucionarlo?

Muchas gracias Saludos

cc: @rgcl

kattatzu commented 5 years ago

Finalmente resolví el problema bajando node a la versión 8.11.4.

Saludos