Как проверить версию node js windows

How to Check Node Version? [Check Node JS Version]

List of content you will read in this article:

Node.js is a widely adopted platform built on JavaScript runtime, allowing you to efficiently create scalable and web-based interactive applications. Node.js works on an event-driven and non-blocking I/O architecture, making it lightweight and perfect for creating data-intensive, real-time applications running on distributed systems.  This article will give you a complete brief and step-by-step guide through which you can find how to check Node version [get Node version], i.e. that can be installed on different platforms. Let’s get started!

What is Node.js?

Node.js was developed as a server-side platform by Ryan Dahl in 2009. It’s only been 12 years and has gained popularity within no time. This software is designed to help create web-based servers and networking tools with JavaScript and various modules. It is capable of handling numerous core functionalities. It offers multiple modules that help in reducing the complications while writing the server applications using its APIs. Node.js is compatible with macOS, Windows, and Linux systems. 

It has been significantly less time since this software has managed to attract large enterprises. Some major companies that rely on Node.js are Groupon, Netflix, IBM, Voxer, SAP, etc.

How to Check Node Version? [Check Node.js Vesion]

Node.js is a cross-platform software that can be installed on various platforms. Over time, it has multiple versions with advanced tools and technology. You can install and check Nodejs version on Linux, macOS, and Windows operating systems.

Here you will learn how to check node version installed in your operating system, along with the installation guide for Linux, Windows, and macOS.

How to check node.js version on Linux with the installation guide?

We are considering Ubuntu as a Linux distro here. You can easily find Node.js within Ubuntu’s repository and use commands for installation. Follow the below-mentioned steps to check the node version on Linux VPS too:

Step 1: Press ctrl+alt+t to open the terminal on your system and run this node command to install Node.js.

sudo apt install nodejs

Check Node.js Version

Step 2: After installing the Node.js, check node version that you have installed with the help of the following node version command.

node -v or node –version

Node version command

Step 3: It is strictly recommended that you install the Node package manager with Node.js. Npm offers you the open-source library of the Node.js packages. For installing NPM, use these commands.

sudo apt install npm
npm -v or npm –version

How to check Node version on windows with the installation guide?

To install Node.js on your Windows system, you need administrative rights on your user account and command line. Follow the below-mentioned steps if you want to install and check Node.js’ version of Node.js in Windows.

Step 1: Navigate to the official download site of Node.js and select the Windows installer button. It will start the download for the latest version by default. The NPM installer comes with an NPM package manager.

Check Node Version

Step 2: After the completion of the download process, launch the installer. Open the directory where you store your download files.

Step 3: You will be asked if you want to run the software to confirm and click Run.

Step 4: You will be entered in the Node.js setup wizard and click on Next.

Step 5: You will be asked to accept the license, click Next after agreeing on the terms and conditions, and start installing the software.

Step 6: You will be asked for the software’s location, and you can leave the default location or fill in the required path and click Next.

Step 7: Next, select the components you want and do not wish to include accordingly and click Next.

Step 8: At last, you can click on the Install option to run the installer and click on Finish.

Run the following command on the command prompt, and you can verify the installed version of Node.js.

node –v

node js version command

How to check node.js version on Mac and the installation guide?

You can go through the following steps for installing Node.js on macOS.

Step 1: Go to the official download page for Node.js and select macOS.

how to Check Node.js Version

Step 2: Start running the download Node.js .pkg installer.

Step 3: Once the download process is complete, you can start running the installer, accepting all the details, and clicking installs to finish the procedure.

Step 4: Once the installation process is completed, you can find Node version, i.e., installed in your system.

Run the following nodejs get version command to check the version of Node.js.

$ node -v

how to get Node Version

Benefits of Node.js

Below are various benefits offered by Node.js:

1. Robust Technology Stack

After JavaScript, Node.js has become a robust stand-alone name in the programming field. It has experienced more than 368,985,988 downloads and over 750 contributors and is still growing. If you are using Node.js for backend development, you will automatically get all the advantages of full-stack development.

  • It offers better efficiency for improving the developer’s productivity.
  • You can share and reuse the code.
  • It helps in enhancing the speed and performance of your project development.
  • It allows you to collaborate with your team efficiently for better productivity.
  • It provides you with a wide range of free tools.
  • It makes your team more flexible and requires less time in development.
  • It helps the developers to start server-side programming with minimum effort.

2. Perfect for Microservices

Node.js is a lightweight tool, making it suitable for microservices architecture. It allows you to break application logic into smaller modules rather than building a single and large monolithic core. It ensures better flexibility and scalability for the development process. It also helps you add more microservices to the existing ones rather than add more features using the basic application functionality.

3. Rich Ecosystem

Node.js comes with npm, which provides a marketplace for open-source JavaScript tools and helps advance this technology. Node.js has a wide range of libraries and still adding over time, providing a rich ecosystem. Today, about 97 percent of advanced web-based applications use npm modules, proving its unstoppable contribution to extensive development. 

Due to its rich ecosystem, there is considerable potential for the growth of Node.js as technology helps create new solutions without investing in the development process.

4. Strong Corporate Support

After Joyent supported the development of Node.js, it created the Node.js foundation in 2015. It helps in adopting and accelerating Node.js development. Many major companies, like IBM, PayPal, SAP, etc., have become the organization’s founding members. With time, many companies are adopting Node.js. Also, there are very few open-source projects that have strong corporate support.

Drawbacks of Node.js

1. Performance Bottlenecks

When using Node.js, you may face some drawbacks, like the inability to process CPU-bound tasks efficiently. To understand the root cause of the problem, you need to have a bit of context about the situation. 

Everyone knows that we use Node.js as a runtime environment that helps execute the JavaScript on the server side. JavaScript is a front-end programming language that allows you to quickly use a single thread for processing the task. It will not require threading for working as all the tasks in JavaScript are lightweight and consume little CPU, which may lead to bottlenecks if multiple tasks are handled.

If we consider Node.js, the main problem occurs when it receives a CPU-bound task. Once it gets a heavy task, it will set all the CPU available for processing it first and later answer the other queued request. It will result in slow processing and delay in the event loop process, making Node.js unsuitable for handling heavy computation.

2. Immature Tools

However, Node.js consists of stable and mature modules, but numerous tools are available in the npm registry that is of poor quality and stored without being tested. It does not have a structured registry for offering tools based on their rating and quality. It makes it a challenging situation for finding the best solution for your purposes without understanding the need for it. 

Node.js ecosystem is open-source, and Joyent is supervising the quality. Still, there might be a possibility that the remaining tools lack quality standards set by the global organization.

Conclusion

Node.js has been widely popular due to its various benefits for creating web-based and interactive websites. However, it has multiple versions, and you can choose any, but most prefer to use the latest node js version to experience better tools and functionality. We have explained a guide to You can learn how to install Node JS and the steps you must follow to check the node js version. You can install Node.js on any platform quickly and seamlessly, following straightforward steps.

People are also reading:

  • What is Node.js?
  • How to Install Node.js and NPM?
  • How to Update Node.js?
  • How to update NPM package to the latest version?
  • How to Check NPM Version?

Перед тем как рассматривать полезные команды при работе с Node.js, её необходимо установить.

Команды помогают узнать версию Node.js,

node -h — показывает список всех доступных команд Node.js.

node -vnode --version — показывает установленную версию Node.js.

npm -h — показывает список всех доступных команд пакетного менеджера npm.

На скриншоте часть команд, доступных вместе с npm

На скриншоте часть команд, доступных вместе с npm

npm -vnpm --version — показывает установленную версию npm.

Обе команды дают одинаковый результат

Обе команды дают одинаковый результат

Команда npm update npm -g позволяет обновить версию npm.

npm list --depth=0 показывает список установленных пакетов.

Список установленных пакетов может быть довольно длинным, особенно, если вы давно пишете код.

Список установленных пакетов может быть довольно длинным, особенно, если вы давно пишете код.

Команда npm outdated --depth=0 покажет список установленных пакетов, которые требуют обновления. Если все пакеты обновлены, список будет пустым.

npm install package — позволяет установить любой пакет по его имени. Если при этом к команде добавить префикс -g пакет будет установлен глобально на весь компьютер.

Процесс установки gulp

Процесс установки gulp

Команда npm i package является укороченной альтернативой предыдущей команды.

Если вы хотите установить конкретную версию пакета, воспользуйтесь префиксом @ с номером версии. Например, npm install package@1.0.1.

npm uninstall package — удаляет установленный пакет по имени.

Команда npm list package — покажет версию установленного пакета, а команда npm view package version — последнюю версию пакета, которая существует.

Для работы с пакетным менеджером также пригодится файл package.json, который должен лежать в директории, с которой происходит работа в консоли.

Файл package.json

Файл package.json

Он содержит различные мета-данные, например, имя проекта, версия, описания и автор. Также он содержит список зависимостей, которые будут установлены, если вызвать из этой папки команду npm install.

Кроме этого он ещё имеет скрипты, которые вызывают другие команды консоли. Например, для этого файла вызов команды npm start вызовет запуск задачи Grunt с именем dev. А команда npm run build вызовет скрипт build, который запустит задачу в Grunt с именем build.

Во время работы часто возникает необходимость установить некоторые пакеты. Если установить пакет с префиксом --save, то он автоматически запишется в package.json в раздел dependencies. Такая же команда с префиксом --save-dev запишет пакет в раздел devDependencies.

Что такое nvm

nvm (илиNode Version Manager) — утилита, которая позволяет быстро менять версии Node.js.

Чтобы её установить, достаточно запустить скрипт

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash

Теперь можно установить последнюю версию Node.js, например,5.0 с помощью команды nvm install 5.0. Чтобы начать использовать её, введите команду nvm use 5.0. Таким образом, можно быстро переключаться между версиями, например, для тестирования.


«Доктайп» — журнал о фронтенде. Читайте, слушайте и учитесь с нами.

ТелеграмПодкастБесплатные учебники

Knowing what Node.jsNode.js is an asynchronous event-driven JavaScript runtime and is the most effective when building scalable network applications. Node.js is free of locks, so there’s no chance to dead-lock any process. version you have in a project is vital because it affects the Node and JavaScript language features you can use. Also, you might not want to miss out on essential security patches or experience compatibility problems.

There are several ways to check the Node version you’re using. You can use basic command line prompts, npmnpm is a software registry that serves over 1.3 million packages. npm is used by open source developers from all around the world to share and borrow code, as well as many businesses. There are three components to npm: the website the Command Line Interface (CLI) the registry Use the website to discover and download packages, create user profiles, and…, or nvm as well to do it. In this article below, we list ways for you to check your Node version with different methods, on different operating systems.

Check your Node version in one step

To check the version of Node.js on your computer (may it run MacOS, Windows or a Linux distro such as Ubuntu), run the following command:

$ node -v

This will return the current version of node that is installed on your system. 

If you want to learn more about Node.js, you can find instructions and official docs on the node website. https://nodejs.org/en/download/ 

To check the latest version of Node for both the LTSLTS means long-term support. The acronym is often used to mark Node.js release lines that will be maintained and supported for an extended period. There are two separate kinds of LTS releases: Active and Maintenance. The Active release line often gets new features and other improvements beside security patches and bug fixes, and the Maintenance only gets the latter. It… and Current versions, check out our blog post that collects and lists all major updates.

Using npm to check your node version (and also update it)

Alternatively, you can use a package manager like npm to update Node. 

https://docs.npmjs.com/cli/update-node

$ npm install -g npm@latest 

then

$ npm update -g node 

will update node and npm. 

If you are having issues with your node installation, you can try the following commands:

$ npm cache clean

$ npm install -g --unsafe-perm node 

These commands will try to clean up any issues with your npm cache and install Node with permissions that may help resolve any installation issues. 

To only check your npm version, you can use the following command:

$ npm -v

Managing your Node versions with nvm

NVM (Node Version Manager) is a bash script that allows you to manage multiple active versions of Node.js. It allows you to install, uninstall, list, and switch between node versions.

​​The preferred way for managing your local node.js versions is to use nvm, which can be installed like this:

curl https://raw.githubusercontent.com/creationix/nvm/v0.33.3/install.sh | bash

Then, use this to install node.js:

$ nvm install node

To use a specific version of node.js, you can do:

$ nvm use node

If you want to uninstall node.js, you can type:

$ nvm uninstall node

To update Node to the latest LTS version, you can use the nvm update node command.

For further details on how to install specific versions, see the nvm docs: https://github.com/nvm-sh/nvm

If you’re using Windows, you’ll need to use nvm-windows, which has almost the same API as nvm, but is a completely different project, and has a different philosophy. https://github.com/coreybutler/nvm-windows

What is Node.js?

If you are already familiar with Node, but need a quick refresher about it, we’ve got you covered:

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. 

Node.js is open-source and free to use. It also provides a first-class development experience, making it an ideal platform for web-based applications. Node.js also has a large community of developers who are constantly creating new modules and libraries to make development easier. 

Node.js applications are written in JavaScript, and can be run on Mac OS X, Windows, and Linux which makes it fully cross-platform. Node.js has an event-driven architecture and a non-blocking I/O model that makes it lightweight and efficient. These features make it perfect for data-intensive, real-time applications that run across distributed devices. 

There are a few things to keep in mind when writing Node.js applications. First, since Node.js is asynchronous, you need to use promises, asyncAsynchrony, in software programming, refers to events that occur outside of the primary program flow and methods for dealing with them. External events such as signals or activities prompted by a program that occur at the same time as program execution without causing the program to block and wait for results are examples of this category. Asynchronous input/output is an… functions, callbacks or events to handle data flow. Second, Node.js is single-threaded, so you need to be careful not to block the thread with long computations. 

How the Node release schedule works

A few words about the Node.js release schedule:

Releases

The Node.js Release Schedule

Node.js releases are identified by a major and minor version number, e.g. v4.2.0. Minor version releases (e.g. v4.2.1) are made every few weeks and contain new features and bug fixes. Major version releases (e.g. v5.0.0) are made every six months or so and may contain breaking changes.

Nowadays, the LTS (long-term support) Node.js versions get an even number, like 16.14.0, while Current releases have an odd version number, like 17.5.0.

  • JS
  • JavaScript

Ответы

Аватар пользователя Кирилл Маркеев

Чтобы узнать версию Node.js, нужно в командной строке ввести команду

node --version

или её короткий вариант

node -v

Курсы по программированию на Хекслете

Backend-разработка

Разработка серверной части сайтов и веб-приложений

Обложка категории Backend-разработка

Frontend-разработка

Разработка внешнего интерфейса сайтов и веб-приложений и верстка

Обложка категории Frontend-разработка

Создание сайтов

Разработка сайтов и веб-приложений на JS, Python, Java, PHP и Ruby on Rails

Обложка категории Создание сайтов

Тестирование

Ручное тестирование и автоматизированное тестирование на JS, Python, Java и PHP

Обложка категории Тестирование

Аналитика данных

Сбор, анализ и интерпретация данных на Python

Обложка категории Аналитика данных

Интенсивные курсы

Интенсивное обучение для продолжающих

Обложка категории Интенсивные курсы

DevOps

Автоматизация настройки локального окружения и серверов, развертывания и деплоя

Обложка категории DevOps

Веб-разработка

Разработка, верстка и деплой сайтов и веб-приложений, трудоустройство для разработчиков

Обложка категории Веб-разработка

Математика для программистов

Обучение разделам математики, которые будут полезны при изучении программирования

Обложка категории Математика для программистов

JavaScript

Разработка сайтов и веб-приложений и автоматизированное тестирование на JS

Обложка категории JavaScript

Python

Веб-разработка, автоматическое тестирование и аналитика данных на Python

Обложка категории Python

Java

Веб-разработка и автоматическое тестирование на Java

Обложка категории Java

PHP

Веб-разработка и автоматическое тестирование на PHP

Обложка категории PHP

Ruby

Разработка сайтов и веб-приложений на Ruby on Rails

Обложка категории Ruby

Go

Курсы по веб-разработке на языке Go

Обложка категории Go

HTML

Современная верстка с помощью HTML и CSS

Обложка категории HTML

SQL

Проектирование базы данных, выполнение SQL-запросов и изучение реляционных СУБД

Обложка категории SQL

Git

Система управления версиями Git, регулярные выражения и основы командой строки

Обложка категории Git

Похожие вопросы

You might use node.js for many of your projects. But do you know how to find the version of node.js? If not, you are in the right place.

Software developers are working every day on adding new features, fixing bugs & patching vulnerabilities to their software. This is because no software is perfect on the very first release. So they roll out various releases, and to differentiate between them, they use version numbers.

Like other software, Node.js too has a lot of versions. Where can we find them? Just visit github.com/nodejs/node/releases and click on tags.

Github page showing the various versions of Node.js available.
Versions of Node.js

As of now, it seems like v18.8.0 is the latest version.

Knowing the version of your node is important because:

  1. You might be working on a project which requires a different node version. In that case to make sure everything works perfectly on your end you have to match that particular node version.
  2. If you are stuck at an older version of node, it might be that your project has some vulnerabilities or security risks. You might also be missing out on some of the improvements that may be implemented in the recent versions. So, you can check if your version is the latest. If not you should update your node.js.

What is Node.js?

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. It’s used for developing server-side applications and for executing JavaScript code outside of a browser.

Read this blog “What is Node.js? – Introduction” to know more about Node.js.

Initial Setup

If you don’t have Node.js installed on your local machine, don’t worry, Codedamn got you covered.

If you already have Node.js installed on your local machine, then you can skip this section.

So, let’s start:

1. Visit the Codedamn Playground and select Node.js.

Codedamn Playground

Codedamn Playground

2. Give your playground a name. I will set it to “check-node-version”. Now, click on “Create Playground”.

Set your playground name

3. It should open up a web IDE with a terminal at the bottom. Press Ctrl+C to stop the current process that is running.

Codedamn IDE with terminal at the bottom

Codedamn IDE with a terminal at the bottom

Now you have a system with Node.js installed.

Determining the version of Node.js

It’s actually very simple. And you don’t even have to remember anything.

Most of the command line tools have a help flag. Running the command with this flag gives us a manual on how to use the tool. So just type node --help and you will get a list of all the available flags.

node --help

node --help output

node –help output

There will be a lot of information, but all we need to search for is “version”. Right at the bottom, you will find the flag for the version.

node version flag in help

node version flag in help

So, the flag to get the version is --version or -v. So just type node -v and you will get the version of Node.js you are using.

$ node -v v16.17.0

or,

$ node --version v16.17.0

node version

node version

So, this means that I am using version 16.17.0 of Node.js. This might be different from the version you are using.

Even though the steps mentioned in this article are very specific to Node.js, they can still be applied to most of the command line tools.

Conclusion

So, in this article, we learned the importance of versions and why we should keep our software updated. We learned some tips on how to find the relevant flags of a command. To find the version of the node that we are using, we use the flag --version or -v.

Become The Best Full-Stack Developer 🚀

Codedamn is the best place to become a proficient developer. Get access to hunderes of practice Node.js courses, labs, and become employable full-stack web developer.

Free money-back guarantee

Unlimited access to all platform courses

100+ practice projects included

ChatGPT Based Instant AI Help (Jarvis)

Structured Node.js Full-Stack Roadmap To Get A Job

Exclusive community for events, workshops

Start Learning

  • Как проверить битность системы windows 10
  • Как проверить usb камеру на windows 10
  • Как проверить версию postgresql windows
  • Как проверить билд windows 10
  • Как проверить web камеру windows 10