How to Install Node.js on Fedora 35 / Fedora 34 | Holhol24
Node.js is an open-source, cross-platform JavaScript runtime surroundings for creating server-side programs.
It makes use of an event-driven, non-blocking I/O fashion that makes it light-weight and efficient, ultimate for data-intensive real-time programs that run throughout allotted gadgets.
Here, we will be able to see the way to set up Node.js on Fedora 35 / Fedora 34.
Install Node.js on Fedora 35
You can set up Node.js the use of NodeSource, NVM, and Debian repository. So, practice any one of the most strategies you assume is more straightforward to put in Node.js.
You might want to set up the curl bundle prior to continuing additional.
sudo dnf set up -y curl
Install Node.js the use of NodeSource
Nodesource is a number one industrial endeavor tool corporate, and it supplies repositories for Node.js and NPM set up.
At the time of writing this newsletter, the under variations are appropriate for manufacturing utilization. You can consult with the professional web page to search out the supported Node.js variations.
- v16.x (Active LTS)
- v14.x (Maintenance LTS)
- v17.x (Latest Version)
v16.x (Active LTS)
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash - sudo dnf set up -y nodejs
v14.x (Maintenance LTS)
curl -fsSL https://rpm.nodesource.com/setup_14.x | sudo bash - sudo dnf set up -y nodejs
v17.x (Latest Version)
curl -fsSL https://rpm.nodesource.com/setup_17.x | sudo bash - sudo dnf set up -y nodejs
Install Node.js the use of NVM
nvm is a model supervisor for Node.js, and it is helping you put in Node.js in step with consumer and invokes it in step with shell. Also, it permits you to set up and use more than one variations of node.js in parallel.
Install nvm through operating the under command.
curl -fsSL https://uncooked.githubusercontent.com/nvm-sh/nvm/v0.38.0/set up.sh | bash -
After the set up of nvm, go out the present consultation and log in again.
Then, use the under command to make sure the nvm set up.
nvm -v
Output:
0.38.0
Now, you’ll be able to use the nvm command to put in the most recent solid model, the most recent LTS model, a selected model of Node.js with the under instructions.
# Latest Stable Version nvm set up node # Latest LTS Version nvm set up --lts # Specific Version nvm set up 12.22.5
Use nvm ls-remote to record the to be had Node.js model to put in, nvm use node/–lts/
Install Node.js the use of Fedora Repository
Node.js could also be to be had as a module in Fedora, and you’ll be able to set up it in conjunction with npm (Node Package Manager)the use of the under command.
Node.js v16.x (LTS) and npm v8.1.x are to be had within the Fedora repository when writing this newsletter.
Use sudo dnf module record nodejs to record the to be had streams (Node.js model), allow/disable the move with the sudo dnf module allow/disable -y nodejs:
sudo dnf module allow -y nodejs:16 sudo dnf set up -y nodejs npm
Check Node.js Installation
Check the Node.js model the use of the next command.
node -v
Output: (Node.js v16.x)
v16.13.1
Check the npm model.
npm -v
Output:
8.1.2
Install Build Tools
You will want to set up construct equipment to assemble and set up local addons from npm.
sudo dnf set up -y gcc-c++ make
Conclusion
That’s All. I’m hoping you’ve got realized the way to set up Node.js on Fedora 35 / Fedora 34.