justmoon / node-bignum

Big integers for Node.js using OpenSSL
419 stars 116 forks source link

commit 57e48c breaks meteor npm rebuild #89

Closed c9s closed 6 years ago

c9s commented 7 years ago

The related changes in the commit 57e48c3f052249725517415d83c7147e4a8c44c8:

diff --git a/index.js b/index.js
index a788e6a..1ed4d76 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,7 @@
-var bin = require('bindings')('bignum.node')
+var binary = require('node-pre-gyp')
+var path = require('path')
+var binPath = binary.find(path.resolve(path.join(__dirname, 'package.json')))
+var bin = require(binPath)
 var BigNum = bin.BigNum

 module.exports = BigNum

Which cause this error:

> bignum@0.12.5 install /opt/shaka/tmp/bundle/programs/server/npm/node_modules/meteor/c9s_nsq/node_modules/bignum
> node-pre-gyp install --fallback-to-build

module.js:327
    throw err;
    ^

Error: Cannot find module '../'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/opt/shaka/tmp/bundle/programs/server/npm/node_modules/meteor/c9s_nsq/node_modules/.bin/node-pre-gyp:15:20)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

npm ERR! Linux 4.4.23-31.54.amzn1.x86_64
npm ERR! argv "/opt/nodejs/bin/node" "/opt/nodejs/bin/npm" "rebuild" "--update-binary"
npm ERR! node v4.6.2
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! bignum@0.12.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.12.5 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bignum
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls bignum
npm ERR! There is likely additional logging output above.
rvagg commented 6 years ago

See if the latest version works. It's got a new internal config that may or may not help.