bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
92 stars 55 forks source link

Failing to install on macOS 10.14.2 #32

Closed rossbulat closed 5 years ago

rossbulat commented 5 years ago

Node version: v8.12.0 yarn version: v1.12.3

Originally discovered when attempting ot install js-ipfs. Issue for that is open here.

Failing to install. npm i tiny-secp256k1 outputs:

module.js:550
    throw err;
    ^
Error: Cannot find module '../lib/utils/unsupported.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
junderw commented 5 years ago

Could you try this?

https://stackoverflow.com/a/45348862/3074620

Or use node-brew instead to install node and npm, since brew is not too good:

https://github.com/hokaccha/nodebrew

rossbulat commented 5 years ago

@junderw The fresh reinstall of node worked. Thank you

sudo rm -rf /usr/local/lib/node_modules/npm
brew reinstall node