How To Install Node.js

Including:

  • SerialPort
  • WS
  • P5.SerialServer

Mac Install

 


Step 1:

Please visit the following link to install the 10.16.0 version of Node.js. Which includes npm version 6.9.0.

https://nodejs.org/en/download/

Use the installer not the binary download links. Make sure to select the correct download link for which system you have.

If you wish to install a more recent version of Node.js please go to: https://nodejs.org/en/

 


Step 2:

Take the download from your browser and move the .pkg file to the desktop. You can click on that file to start the installer.

 


Step 3:

Click on the continue button.

 


Step 4:

Read the license agreement if you wish and click continue to move forward.

 


Step 5:

Click the agree button to move forward.

 


Step 6:

You may click the change install location button if you wish to change the install location of Node.js. If not click the install button.

 


Step 7:

Enter the password for the account you are sign in on. Click the Install Software button to continue.

Now your install for Node.js should be complete. Click the close button to exit the installer.

 


Step 8: Open your Terminal application and type the following…

   node –v    

Node.js should return its version as the response.

Installing SerialPort, WS and P5.SerialServer

  


Step 1:

In the terminal application type the following…

   sudo npm install serialport --unsafe-perm -g  

Wait for the download to complete.

  


Step 2:

In the terminal application type the following…

       sudo npm install ws -g  

Wait for the download to complete.

 


Step 3:

In the terminal type the following…

   sudo npm install p5.serialserver --unsafe-perm -g   

Wait for the download to complete.

Windows Install

 


Step 1:

Please visit the following link to install the 10.16.0 version of Node.js. Which includes npm version 6.9.0.

https://nodejs.org/en/download/

Use the installer not the binary download links. Make sure to select correct download link for which system you have.

If you wish to install a more recent version of Node.js please go to: https://nodejs.org/en/

 


Step 2:

Take the download from your browser and move the installer to the desktop. You can click on the installer to start.

 


Step 3:

Click on the next button.

 


Step 4:

Read the license agreement if you wish and check mark that you agree. Then click the next button.

 


Step 5:

You may click the change button to change the install location of Node. If not you can just click the next button.

 


Step 6:

Just click the next button.

 


Step 7:

Click the install button.

 


Step 8:

Click the finish button.

 


Step 9:

Open your command prompt by typing in the windows search “cmd”.

In the console type the following…

   node –v    

Node.js should return its version as the response.

Installing SerialPort, WS and P5.SerialServer

 


Step 1: Install SerialPort

In the command prompt type the following…

   npm install serialport –g    

Wait for the download to complete.

 


Step 2:

In the command prompt type the following…

   npm install ws –g    

Wait for the download to complete.

 


Step 3:

In the command prompt type the following…

   npm install p5.serialserver –g    

Wait for the download to complete.

Linux Install (CentOS 7)

 


Step 1:

In a fresh CentOS environment you first need to enable the dhclient by entering the following command in the terminal:

          sudo dhclient   

Then update the OS by entering:

        sudo yum -y update  

 


Step 2:

Install the repository by entering first:

      sudo yum install -y gcc-c++ make     

Then:

      curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -    

 


Step 3:

Now install Node.js by entering: 

     sudo yum install nodejs    

If Node.js installed correctly then the following should produce the same results.

 

 

Installing SerialPort, WS and P5.SerialServer

  


Step 1:

In the terminal application type the following…

   sudo npm install serialport --unsafe-perm -g  

Wait for the download to complete.

  


Step 2:

In the terminal application type the following…

       sudo npm install ws -g  

Wait for the download to complete.

 


Step 3:

In the terminal type the following…

   sudo npm install p5.serialserver --unsafe-perm -g   

Wait for the download to complete.