[embedyt] https://www.youtube.com/watch?v=hN55CQLza04[/embedyt]
In this tutorial, i am going to tell you how to install Node js in Mac OS. But before that let us understand what Node js is and why should we use it?
Node js is a javascript run time environment, and it is built on Chrome’s v8 engine. It executes a javascript programme in the browser. Node js has provided superpowers to javascript as other programming languages have.
In this section, you will get SQL Server 2017 running on Docker. After that, you will install the necessary dependencies to create Node.js apps with SQL Server locally on your Mac. Step 1.1 Install SQL Server. In order to run SQL Server on your Mac, we are going to use the SQL Server on Linux Docker Image. For this, you need to install Docker.
Why should we use Node JS?
Every programming language has its own benefits, when we talk about Node js, it was developed considering better performance and scalability for software applications. It’s a power-packed tool which is used for large and complex web and mobile applications.
Here are the few reasons to use Node JS.
Note: Due to the use of nodejs instead of node name in some distros, yarn might complain about node not being installed. A workaround for this is to add an alias in your.bashrc file, like so: alias node=nodejs.This will point yarn to whatever version of node you decide to use. If Yarn is not found in your PATH, follow these steps to add it and allow it to be run from anywhere. As of this PR to homebrew/versions and this PR to homebrew, the answers involving brew tap homebrew/versions or.-lts packages no longer work. The correct answer is now: brew install node@ Where is 0.10, 0.12, 4, etc.For example, to install Node.js v6 (as of this writing, the most recent LTS version). Note: Due to the use of nodejs instead of node name in some distros, yarn might complain about node not being installed. A workaround for this is to add an alias in your.bashrc file, like so: alias node=nodejs. This will point yarn to whatever version of node you decide to use. Installing Node.js® and NPM on Mac. You’ll also need the Terminal to use Node.js and NPM. The Terminal application is located in the Utilities folder in the.
- It is fast and easy.
- Large single free code base.
- It is fast because of Google support
- It can be used client and server side.
- It supports Mac OS, Windows and Linux.
- Best for building games and chat apps.
- It’s a best used free server side language.
- It is best for enterprise level web applications.
- Code execution is better than other programming languages.
- It enhances the effectiveness of front-end and back-end development.
How to Install Node js in Mac OS?
Head over to node js official website and download the node js installer. You’ll see a few versions, but I would suggest downloading the recommended version.
Once your installer is downloaded, then click on it and let the install wizard do its work. It’ll install both Node and NPM (node package manager), NPM allows us to install other packages in the node_modules folder.
Then accept the agreement and install the node js in your mac os.
Finally it will ask you to make sure /usr/local/bin is in your
$PATH
. Run the command to check the path.Use the below method to check whether Node js working correctly or not by using below commands.
Press
‘control’ + ‘c’
twice to come out from the node terminal.Run the following command to check the node version.
Before you can start making super awesome apps in NodeJS, you have to install it. Fortunately, installing NodeJS is super simple.
In this tutorial we will cover how to install NodeJS/NPM in
- macOS/linux
- Windows
Once you install NodeJS/NPM, you can easily upgrade/downgrade to any Node version with one command. The following video tutorial shows you how to download NodeJS on your machine.
Installation guide for Mac OS & Linux
Open a new terminal. Type the following and hit enter:
Close your terminal, then open a new one and type this:
You will see something like this:
Next in your terminal type:
Once it is installed, it is ready to be used. To use this version, just type this in your terminal:
Now that it is installed let's check it by doing the following:
And that is it – you are done. Have fun.
Node Js Online Terminal
Now if, in the future, for some reason you want to uninstall NVM (node version manager) simply open up your terminal and type the following:
Install Node Js Mac
Installation guide for Windows
First, go to
nvm-windows
repositories releases section https://github.com/coreybutler/nvm-windows/releases. Select the latest release. Next choose the
nvm-setup.zip
file and download it.Once the file is downloaded, unzip and click on the installer and follow the steps. (I am using 7zip for .zip file extraction, because it is FREE.)
Then to check if
nvm
is properly installed, open a new command prompt terminal and type nvm
. Once it is verified that it is installed you can move on to the next step.Install NodeJS using
nvm
like this:The version can be a NodeJS version or 'latest' (for the latest stable version).
In order to use the specific node version you just installed, in your terminal simply type the following:
Check the node version with node -v. This should output v12.18.1 in your terminal.
Node Js Mac
If you want to install another version of Node, repeat the steps with a different version.
Download Node Js Mac Terminal Linux
You should now have a working version of NodeJS running on your machine. Happy coding folks. :)
Let me know if you found this guide helpful. Drop me a message on twitter (twitter.com/adeelibr).