I am trying to install web3 using command

npm install --save [email protected]

However, it is failing with error :

verbose node v8.9.1 verbose npm v4.6.1 error code 128 error Command failed: git -c core.longpaths=true rev-list -n1 browserifyCompatible error fatal: ambiguous argument 'browserifyCompatible': unknown revision or path not in the working tree. error Use '--' to separate paths from revisions, like this: error 'git <command> [<revision>...] -- [<file>...]'

EDIT After following a suggestion in this thread, npm got updated but the npm installed with node was still being used. SO fixed that using this. Now, the error is showing as :

794 verbose stack Error: Command failed: C:\Program Files\Git\cmd\git.EXE clone --depth=1 -q -b browserifyCompatible git://github.com/frozeman/WebSocket-Node.git C:\Users\<USER>\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-3198c7e8 --config core.longpaths=true 794 verbose stack warning: templates not found in C:\Users\<USER>\AppData\Local\Temp\pacote-git-template-tmp\git-clone-f63c9472 794 verbose stack warning: Could not find remote branch browserifyCompatible to clone. 794 verbose stack fatal: Remote branch browserifyCompatible not found in upstream origin

Versions : [email protected], [email protected] , git version 2.19.1

Yarn gives similar error. I tried tracing npm logs, the error occurs while looking up for branch named "browserifyCompatible" for websocket dependency which seems a valid branch.

I've tried starting cmd with admin privileges and executing from git bash and reinstaling git, node, npm. Any inputs will be highly appreciated.

2 Answers 2


Try installing a newer version of web3, otherwise update node, try yarn and I guess other things, if you had docker you should be able to install.

  • I tried using npm install --save web3 with no luck. Yarn spits out same error. I didn't try with docker though. I have updated the post with more details.
    – Shwetaudac
    Commented Oct 20, 2018 at 16:48
  • Also, I think web3 is at like [email protected] Another alternative would be to try installing a project with web3 as a dependency such as truffle box.
    – GrandFleet
    Commented Oct 20, 2018 at 17:14
  • Sure, I'll try that.
    – Shwetaudac
    Commented Oct 20, 2018 at 18:17

Your version of npm is out of date. Upgrading should be as simple as running npm i -g npm.

  • I tried it, didn't work though. Same error again. Thanks for the help!
    – Shwetaudac
    Commented Oct 17, 2018 at 19:26
  • Sorry, I'm unable to reproduce this, but it seems to be an incompatibly between npm and git (npm is usually the culprit). Can you update git and see if that resolves the issue? Otherwise update your post to specify the OS and versions of node, npm, and git. Also, you could try yarn.
    – Motoma
    Commented Oct 19, 2018 at 11:01
  • I tried updating git too with no success. Sure, I'll update the post with more details
    – Shwetaudac
    Commented Oct 19, 2018 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.