`npx openzeppelin init` gives error Npm ERR! 404 Not Found - GET https://registry.npmjs.org/openzeppelin - Not found


I have just started to take a look on open zeppelin and I have been unable to start with the tutorial.
My problem is that I cannot run npx openzeppelin init command.

What I did was: new folder, go to that folder then run npm init, I have node on v13.6.0 and npm on 6.13.4

I also ran npm install @openzeppelin/contracts

When I run npx openzeppelin init I get the following:

npm ERR! code E404

npm ERR! 404 Not Found - GET https://registry.npmjs.org/openzeppelin - Not found

npm ERR! 404

npm ERR! 404 ‘openzeppelin@latest’ is not in the npm registry.

npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

I am working on MacOS 10.15.2 Catalina.
I have no clue what to do or where that is coming from. Any help?

1 Like

Hi @r3p1v,

Sorry that you are having issues. Prior to running npx openzeppelin init we need to install the OpenZeppelin CLI by running npm install @openzeppelin/cli

$ mkdir myproject && cd myproject
$ npm init -y
$ npm i @openzeppelin/cli
$ npx openzeppelin init

You may also need to run an earlier version of node (I currently use node 10) as there is an issue with node 13. https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1289

1 Like

I was having trouble installing the cli. Might be due to the node version I currently have. I will take test an older version of node and let you know.
Thank you

1 Like

Hi @r3p1v,

I use nvm to switch node versions. I have been using node 10 with no issues.

Let me know how you get on.

Hello, I have tried with node12 and the installation went good.
I unlinked brew from node 13 and installed node 12 and linked it to it.
Maybe we should specify on the tutorial that we cannot install using the latest node version, it would save a lot of time for new comers.

I can finally start!
Thanks again

1 Like

Hi @r3p1v,

I’m sorry that you had this experience. I definitely want to prevent other community members running into this whilst there are issues with node 13.

Hi @r3p1v,

I wanted to let you know that OpenZeppelin CLI 2.7.1 runs on node 13.

See the announcement of OpenZeppelin CLI 2.7 for details on new functionality.

I did not run “npm init” in the start and I ran into the same problem.

I am using node v13.2.0
@openzeppelin/cli@2.7.1 installed fine

following also worked fine
npx openzeppelin init
npx oz link @openzeppelin/contracts-ethereum-package

1 Like

A post was split to a new topic: npx oz link @openzeppelin/upgrades error: Cannot read property ‘trim’ of undefined