Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Getting 'Cannot find module wrtc.node' #778

Closed
zabirauf opened this issue Feb 26, 2017 · 2 comments
Closed

Getting 'Cannot find module wrtc.node' #778

zabirauf opened this issue Feb 26, 2017 · 2 comments

Comments

@zabirauf
Copy link

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)
@compsocial
Copy link

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.

@zabirauf
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants