The first thing you should do is check to see if you have a version of Node.js already installed. To do that:
Brew install jq brew install libtool brew install autoconf brew install automake brew install pkg-config Other steps are the same as what we did for Linux. (Refer to step 3 to the final step). Windows Cardano-node installation is quite similar to MacOs and Linux.
Terminalthen pressing Enter.
node - vin the Terminal and press Enter.
npm i -g npm. If you get a bunch of
checkPermissionswarnings, you should run the command as the superuser like this:
sudo npm i -g npm
-bash: node: command not found. Continue with these instructions to install it.
Terminalthen pressing Enter.
node - vin the Terminal to verify that Node.js is installed correctly and to see the version of Node.js that was installed.
If a version was output, then you're all set.
Just like any programming language, platform, or library, getting up and running with Node.js takes some initial setup before you can start hacking away. With Node.js, the only initial setup required is, quite simply, getting the binary installed.
In this quick tutorial, we'll take a quick look at how to get Node.js on macOS. Once we've completed the entirety of the tutorial, you'll be ready to take the next step with Node.js.
This guide covers installing Node.js on the following versions of OS X and macOS: OS X 10.10 (Yosemite), OS X 10.11 (El Capitan), and macOS 10.11. These are the versions that are consistently tested and supported by the Node.js build process at the time of writing.
Here's the abbreviated guide, highlighting the major steps:
node -vin your terminal - you should get something like
As our first step, we need to actually get the official installer for Node.js on macOS. To do so, we can head over to the Node.js Downloads page to download the installer.
You can get the macOS installer by clicking the
Macintosh Installer option - this will download the
.pkg installer for Node.js. Make sure you save it somewhere that you'll be able to access it!
Now that you've got the installer downloaded, you'll need to run it. The installer is a pretty typical interface - it won't take long to get through it (under a minute), even though there are a few parts to it. You can get through it by following the guide below:
To verify that Node.js was installed correctly on your Mac, you can run the following command in your terminal:
If Node.js was properly installed, you'll see something close to (but probably not exactly) this:
As one last step for good measure, we'll update your version of npm.
Node.js always ships with a specific version of npm - Node.js doesn't (and shouldn't!) automatically update npm. The npm releases aren't synced with Node.js releases. Because of this, there's almost always a newer version of npm than the one that is installed by default with a given version of Node.
To easily update your version of
npm, you can run the following command:
Now you've got Node.js on your Mac. It's time to start exploring!
That said, if you want to keep in touch with Node.js and the surrounding ecosystem, you should go follow @NodeSource on Twitter! We'll keep you updated with important news from the Node.js project, and share the best Node.js tutorials, guides, and tools that the community has to offer!