# Node.js

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/2026.3/llms.txt).

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript`, `Node.js`, `Node.js Remote Interpreter` -    the plugins are bundled with RubyMine and enabled by default.

[Node.js](http://nodejs.org/) is a lightweight runtime environment for executing JavaScript outside the browser, for example, on the server or in the command line. RubyMine integrates with Node.js providing assistance in configuring, editing, running, debugging, testing, profiling, and maintaining your applications.

If you need Node.js only as a local runtime for your application or for managing npm packages, running JavaScript linters, build tools, test frameworks, and so on, just install [Node.js](http://nodejs.org/#download). If you follow the standard installation procedure, in most cases RubyMine detects Node.js itself.

And even if you have no Node.js on your computer, you can install it when creating a new Node.js application in the Create New Project dialog, refer to [Creating a new Node.js application](#ws_node_create_express_app_choose_node) below.

If you want to switch among several Node.js installations, they must be configured as [local Node.js runtimes](#ws_node_configure_local_node_interpreter). In most cases, RubyMine detects Node.js installations, configures them as runtimes automatically, and adds them to the list where you can select the relevant one.

To run a Node.js application remotely, configure it as a remote runtime. For more information, refer to  [Node.js with Docker](node-with-docker.html), [Node.js via SSH](node-via-ssh.html), and [Node.js with Vagrant](null).

## Before you start

Procedure:

1. Download and install [Node.js](http://nodejs.org/#download).

2. Make sure the JavaScript and TypeScript and Node.js required plugins are enabled on the Settings | Plugins page. For more information, refer to [Plugins](managing-plugins.html).

## Switching between Node.js installations

With RubyMine, you can have several installations of Node.js and switch between them while working on the same project.

![Default system node](https://resources.jetbrains.com/help/img/idea/2026.3/ws_node_alias.png)

Procedure:

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Languages & Frameworks | JavaScript Runtime`.

2. Make sure that Node.js is selected in the Preferred runtime field.

3. Select the required Node.js installation from the Node.js runtime list.

If you followed the standard installation procedure, in most cases the required Node.js installation is on the list. If the installation is missing, click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) and [configure it as a local runtime manually](#ws_node_configure_local_node_interpreter).

## Using a system Node.js version

With RubyMine, you can set the default system `node` alias as your project’s Node.js version. After that, this version will be automatically used by all the tools that require Node.js and in all new run/debug configurations. In particular, this means that you will not have to update the settings for each tool if you install a new Node.js version and make it the default node alias in your system.

> **Tip:**
> This functionality is especially helpful when you are using [nvm](https://github.com/creationix/nvm/blob/master/README.md).

Procedure:

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Languages & Frameworks | JavaScript Runtime`.

2. Make sure that Node.js is selected in the Preferred runtime field.

3. From the Node.js runtime list, select node.

4. Specify this new Node.js runtime where applicable, for example, in your run/debug configurations or settings of specific tools.

## Configuring a local Node.js runtime

You may need to configure Node.js installation as an runtime manually, for example, if Node.js is installed in a non-default location so RubyMine does not detect it automatically.

Procedure:

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Languages & Frameworks | JavaScript Runtime`.

2. Make sure that Node.js is selected in the Preferred runtime field.

3. Click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) next to the Node runtime list.

4. In the [Node.js Runtimes](null) dialog with a list of all the currently configured runtimes, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) on the toolbar and select  Add Local from the context menu  and choose the installation of Node.js, then click OK. You return to the [Node.js Runtimes](null) dialog where the Node runtime read-only field shows the path to the new runtime.

5. In the Package manager field,   choose the package manager (npm, Yarn, pnpm, bun) for the current project.

For more information, refer to [Configuring a package manager for a project](installing-and-removing-external-software-using-node-package-manager.html#ws_npm_yarn_configure_package_manager).

When you click OK, you return to the JavaScript Runtime page where the Node runtime field shows the new runtime.

## Using Node.js on Windows Subsystem for Linux

RubyMine lets you run and debug Node.js applications using [Node.js on Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about). You can choose Node.js on WSL as the [default runtime for the current project](#ws_default_project_node_interpreter) or you can configure and use this Node.js version in a [Node.js Run/Debug configuration](running-and-debugging-node-js.html#Node.js_run).

Procedure: Configure Node.js on WSL as the default project Node.js runtime

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Languages & Frameworks | JavaScript Runtime`.

2. Click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) next to the Node.js runtime field, in the Node.js Runtimes dialog that opens, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg), and then select Add WSL from the list.

![Configure WSL Node.js runtime: add WSL](https://resources.jetbrains.com/help/img/idea/2026.3/rm_add_wsl_node_interpreter.png)

3. In the Add WSL Node Runtime dialog that opens, select the Linux distribution you’re using and specify the path to Node.js.

![Configuring Node.js on WSL as the default project Node.js runtime](https://resources.jetbrains.com/help/img/idea/2026.3/rm_configure_wsl_node_interpreter.png)

## Creating a Node.js application

If you have no application yet, you can generate a RubyMine project with Node.js-specific structure from a template or create an empty RubyMine project and configure Node.js in it as described in [Starting with an existing Node.js application](#ws_node_quick_start_with_an_existing_app) below.

Procedure: Create a new Node.js application

1. Click New Project  on the Welcome screen or select  `File | New | Project`   from the main menu. The [New Project dialog](null) opens.

2. In the left-hand pane, choose Node.js to create a basic Node.js application or Express to create an [Express](http://expressjs.com/) application.

3. In the right-hand pane,  specify the project folder and the Node.js runtime to use. For more information, refer to [Configuring a local Node.js runtime](#ws_node_configure_local_node_interpreter).

If you have only one Node.js on your machine and you followed the standard installation procedure, RubyMine detects your Node.js automatically. Otherwise, choose the relevant runtime from the list, refer to [Configuring a local Node.js runtime](#ws_node_configure_local_node_interpreter) above.

If you have no Node.js installed, select Download Node.js.

For Express applications, specify the  [express
-generator](https://www.npmjs.com/package/express-generator) in the express-generator field.

It is recommended that you use [npx](https://www.npmjs.com/package/npx) that downloads and runs the generator. To do that, select npx --package express-generator express from the express -generator list.

Alternatively,    open your command-line shell or  the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Ctrl+Alt+1` (Visual Studio), `⌘ ⌃ 1` (Visual Studio (macOS)), `Alt+F12` (TextMate), `Alt+F12` (NetBeans), `Alt+F12` (Eclipse), `⌥ F12` (Eclipse (macOS)))  and type `npm install --g express-generator` and then select the downloaded generator from the express-generator list.

![Select express generator](https://resources.jetbrains.com/help/img/idea/2026.3/ws_create_node_express_app_use_npx.png)

Select the template language and the Style Sheet language to use.

4. When you click Create, RubyMine downloads the necessary dependencies and enables code completion for them as well as for the Node.js core APIs. For more information, refer to [Configuring node_modules library](configuring-javascript-libraries.html#ws_js_libraries_examples_node_modules) and [Configuring Node.js Core library](configuring-javascript-libraries.html#ws_js_libraries_node_js_core).

For Express, RubyMine creates a run/debug configuration of the type Node.js with default settings and generates a [basic Express-specific directory structure](https://expressjs.com/en/starter/generator.html#previous-hello-world-next-basic-routing).

For Node.js, RubyMine just runs the `npm init` command to generate a `package.json` file.

Procedure: Create an empty RubyMine project

1. Click New Project  on the Welcome screen or select  `File | New | Project`   from the main menu. The [New Project dialog](null) opens.

2. In the left-hand pane, choose Empty Project . In the right-hand pane, specify the application folder and click Create.

### Starting with an existing Node.js application

If you are going to continue developing an existing Node.js application, open it in RubyMine, configure Node.js in it, and download the required dependencies.

Procedure: Open the application sources that are already on your machine

* Click Open on the Welcome  screen or select `File | Open`   from the main menu. In the dialog that opens, select the folder where your sources are stored.

Procedure: Check out the application sources from your version control

1. Click Clone Repository on the Welcome  screen.

Alternatively, select  `File | New | Get from Version Control` or  `Git | Clone…` or `VCS | Get from Version Control` from the main menu.

Instead of Git in the main menu, you may see any other Version Control System that is associated with your project. For example, Mercurial or Perforce.

2. In the dialog that opens, select your version control system from the list and specify the repository to check out the application sources from. For more information, refer to [Check out a
project (clone)](manage-projects-hosted-on-github.html#clone-from-GitHub).

Procedure: Configure Node.js in a project

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Languages & Frameworks | JavaScript Runtime`.

2. In the Node runtime field,  specify the default Node.js runtime for the current project.  RubyMine automatically uses it every time you select the `Project` alias from Node runtime lists, for example, when creating run/debug configurations.

Select a configured  runtime from the list or click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) and configure a new one in the dialog that opens as described in [Configuring a local Node.js runtime](#ws_node_configure_local_node_interpreter). If you select node, the [system Node.js version](#ws_node_version) is used.

3. Select the Coding assistance for Node.js checkbox  to configure the Node.js Core module sources as a [JavaScript
library](configuring-javascript-libraries.html#ws_js_libraries_node_js_core) and associate it with your project. As a result, RubyMine provides code completion, reference resolution, validation, and debugging capabilities for `fs`, `path`, `http`, and other parts of Node.js that are compiled into the Node.js binary.

When the configuration is completed, RubyMine  displays information about the currently configured version.

4. If you need code completion for Node.js APIs only in some parts of your project, you can configure that using the Manage scopes link. In the [Usage dialog](null) that opens, click the relevant directories and for each of them select the configured Node.js Core library from the list. Learn more from [Configuring the scope of a library](configuring-javascript-libraries.html#ws_js_configuring_js_libs_change_scope).

Procedure: Download the project dependencies

* In your command-line shell or in the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Ctrl+Alt+1` (Visual Studio), `⌘ ⌃ 1` (Visual Studio (macOS)), `Alt+F12` (TextMate), `Alt+F12` (NetBeans), `Alt+F12` (Eclipse), `⌥ F12` (Eclipse (macOS))) ,  type:

`npm install`

* Alternatively, select Run 'npm install' from the context menu of the `package.json` file in your project root.

#### Project security

When you open a project that was created outside RubyMine and was imported into it, RubyMine displays a dialog where you can decide how to handle this project with unfamiliar source code.

Select one of the following options:

* Preview in Safe Mode: in this case, RubyMine opens the project in a preview mode. It means that you can browse the project's sources but you cannot run tasks and script or run/debug your project. RubyMine displays a notification on top of the editor area, and you can click the Trust project… link and load your project at any time.

* Trust Project: in this case, RubyMine opens and loads a project. That means the project is initialized, project's plugins are resolved, dependencies are added, and all RubyMine features are available.

* Don't Open: in this case, RubyMine doesn't open the project.

Learn more from [Project security](project-security.html).

> **Tip:**
> Projects created from the Welcome screen or via `File | New | Project`  as described in  are automatically considered trusted.

