0

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 [email protected]: WARNING: This package has been rename
d to @truffle/config.
npm WARN deprecated [email protected]: For TypeChain 2.x use @typec
hain/truffle-v4 or v5
npm WARN deprecated [email protected]: For TypeChain 2.x use @typec
hain/web3-v1
npm WARN deprecated [email protected]: request has been deprecated, see https://git
hub.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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://[email protected]/web3-js/WebSocket
-Node.git
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
71Z-debug.log

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

1 Answer 1

0

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.

2
  • 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
    Commented Oct 4, 2020 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
    Commented Oct 4, 2020 at 23:45

Your Answer

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