Cannot npm install -g @openzeppelin/cli@2.6 on macOS Catalina 10.15.1

Hi @gitpusha,

Sorry to hear that you are running into permission issues when installing.

Using sudo with npm is highly discouraged, so I recommend resolving the permission issues, either with a node version manager or change npm's default directory:

https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/README.md
If you get an EACCESS permission denied error while installing, please refer to the npm documentation on global installs permission errors. Alternatively, you may run sudo npm install --unsafe-perm --global @openzeppelin/cli , but this is highly discouraged, and you should rather either use a node version manager or manually change npm's default directory.

I use nvm as part of my setup (What is your smart contract development environment setup?)

I am a big fan of Installing packages locally rather than globally (npx). Though I was creating so many OpenZeppelin SDK based projects that I installed @openzeppelin/cli globally.

1 Like