Guys I have node js and npm installed.

But when I try to install OpenZeppelin sdk using the command:

npm install --global @openzeppelin/cli

It doesn't install. I don't know what is wrong. But I think maybe the library is now deprecated.

Some please help me.

When I run the command, it behaves as if it is installing but then encounters errors along the way.

Error shown below:

C:\Users\jude\hd_wallet>npm install --global @openzeppelin/cli
npm WARN deprecated truffle-config@1.1.16: WARNING: This package has been rename
d to @truffle/config.
npm WARN deprecated typechain-target-truffle@1.0.2: For TypeChain 2.x use @typec
hain/truffle-v4 or v5
npm WARN deprecated typechain-target-web3-v1@1.0.4: For TypeChain 2.x use @typec
npm WARN deprecated request@2.88.2: request has been deprecated, see https://git
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer m
aintained. 'mkdirp' itself supports promises now, please switch to that.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/web3-js/WebSocket
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jude\AppData\Roaming\npm-cache\_logs\2020-09-25T10_55_49_4

What could be the problem and how do I fix it??


npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file.

This suggests that Git is not installed. One of the dependencies requires Git to be installed. You can download it from here: https://git-scm.com/downloads.

  • I have downloaded GIT for window. Then I ran the command again there's still some other error. I pasted the error on pastebin because it was to long to paste it here in comment box. pastebin.com/srYzeivx – Iammrjude1 Oct 4 '20 at 22:38
  • So I've fixed the problem. If you're encountering the same issue as this first install python and add python to path. Next install GIT. Then you need to clear cache using the command : npm cache clean --force Then you run the command again npm install - - global @openzeppelin/cli It should install now without issues. Total download size is around 150mb – Iammrjude1 Oct 4 '20 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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