Error: npx oz create; command not found: oz

Trying this command after a long time and it is failing.

npx oz create


npx: installed 16 in 2.779s
command not found: oz

How do I go about troubleshooting and fixing this?

Thanks you.

1 Like

Hi @pkr,

You are getting this error because @openzeppelin/cli is not installed locally in your project.

In a new project

mkdir myproject
cd myproject
npm init -y

We first need to install the tool we are going to use for development and then initialize it. In our case we will use OpenZeppelin CLI.

npm i @openzeppelin/cli
npx oz init

We can can then write contracts, compile (npx oz compile) and deploy (npx oz deploy).

I recommend having a look through the Learn guides if you need a refresher:

Feel free to ask all the questions that you need.

Hi @pkr,

Just wanted to check that you were able to deploy?