I installed the ipfs package globally and when I run jsipfs I get the following error
Secp256k1 bindings are not compiled. Pure JS implementation will be used.
module.js:471
throw err;
^
Error: Cannot find module '/usr/local/lib/node_modules/ipfs/node_modules/wrtc/build/wrtc/v0.0.61/Release/node-v48-darwin-x64/wrtc.node'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ipfs/node_modules/wrtc/lib/peerconnection.js:6:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Also had this issue. For me, it stemmed from wrtc installation problems (but somehow ipfs install kept going?). Like #777, the fix was to get the development libraries, check that I could build wrtc from source via npm, and then reinstall a clean js-ipfs.
Thanks @compsocial, that worked.
For anyone else running into the issue, I did the following to make it work
$ brew update
$ brew install git openssl pkg-config openssl homebrew/dupes/ncurses nss expat
$ npm uninstall -g ipfs
$ npm install -g ipfs
Most helpful comment
Thanks @compsocial, that worked.
For anyone else running into the issue, I did the following to make it work