Files
J1B4-Fitbot/docs/documentation/raspberryPi/nodeJs/nodeSetup.md
2024-05-08 12:32:54 +02:00

1.2 KiB

NodeJs Setup

https://pimylifeup.com/raspberry-pi-nodejs/

Installation

  1. Update the package list and install the dependencies by running the following commands:

sudo apt update

sudo apt install -y build-essential libssl-dev

  1. Download the Node.js source code by running the following command:

wget https://nodejs.org/dist/v14.15.4/node-v14.15.4.tar.gz

  1. Extract the Node.js source code by running the following command:

tar -xzf node-v14.15.4.tar.gz

  1. Change to the extracted directory by running the following command:

cd node-v14.15.4

  1. Configure the Node.js source code by running the following command:

./configure

  1. Compile the Node.js source code by running the following command:

make -j4

  1. Install the Node.js source code by running the following command:

sudo make install

  1. Verify that Node.js has been installed by running the following command:

node -v

  1. Verify that npm has been installed by running the following command:

npm -v

Conclusion

You should now have Node.js installed on your Raspberry Pi. This installation will allow you to run JavaScript applications on your device.