Js-ipfs: Getting 'Cannot find module wrtc.node'

Created on 26 Feb 2017  路  2Comments  路  Source: ipfs/js-ipfs

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)

Most helpful comment

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

All 2 comments

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

daviddias picture daviddias  路  3Comments

mnts picture mnts  路  3Comments

lifeBCE picture lifeBCE  路  3Comments

gitGksgk picture gitGksgk  路  3Comments

daviddias picture daviddias  路  3Comments