Setting Up a Node Project
This guide will help you get your Node development environment set up, which you’ll need to use the different OpenZeppelin tools and other third party products.
|If you are already familiar with Node, npm and Git, feel free to skip this guide!|
Once you’re done, run
node --version on a terminal to check your installation: any version of the 10.x or 12.x line should be compatible with most Ethereum software.
$ node --version v10.16.3
package.json, describing the package’s name, version, content, and others.
All Node installations include a command-line client for the npm registry, which you’ll use while developing your own projects. To start a new project, create a directory for it and run:
$ npm init
Simple as that! Your newly created
package.json file will evolve as your project grows, such as when installing dependencies with
A third binary was included when installing node:
npx. This is used to run executables installed locally in your project.
Some OpenZeppelin tools (like the CLI) are executables intended to be run using
npx. Not including
npx will cause errors due to the binary not being in the system path, so for clarity we’ll display the full command in our guides:
$ openzeppelin init openzeppelin: command not found $ npx openzeppelin init Welcome to the OpenZeppelin SDK!
Make sure you are inside your project’s directory when running
Before you get coding, you should add version control software to your project to track changes.
|If you’ve never used Git before, a good starting place is the Git Handbook.|