JetBrains Rider 2024.2 Help

Languages and frameworks: Node.js

Node.js is a lightweight runtime environment for executing JavaScript outside the browser, for example, on the server or in the command line. JetBrains Rider 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. If you follow the standard installation procedure, in most cases JetBrains Rider detects Node.js itself.

If you want to switch among several Node.js installations, they must be configured as local Node.js interpreters. In most cases, JetBrains Rider detects Node.js installations, configures them as interpreters 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 interpreter. For more information, refer to Node.js with Docker, Node.js via SSH, and Node.js with Vagrant.

Before you start

  1. Download and install Node.js.

  2. Make sure the JavaScript and TypeScript and Node.js required plugins are enabled on the Settings | Plugins page, tab Installed. For more information, refer to Managing plugins.

Switching between Node.js versions

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

  1. Press Ctrl+Alt+S to open settings and then select Languages & Frameworks | Node.js.

  2. Select the required Node.js installation from the Node Interpreter 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 and configure it as a local interpreter manually.

Using a system Node.js version

With JetBrains Rider, 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.

  1. Press Ctrl+Alt+S to open settings and then select Languages & Frameworks | Node.js.

  2. From the Node interpreter list, select node.

    Default system node
  3. Specify this new Node.js interpreter where applicable, for example, in your run/debug configurations or settings of specific tools.

Configuring a local Node.js interpreter

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

  1. Press Ctrl+Alt+S to open settings and then select Languages & Frameworks | Node.js.

  2. Click the Browse button next to the Node Interpreter list.

  3. In the Node.js Interpreters dialog with a list of all the currently configured interpreters, click the Add button 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 Interpreters dialog where the Node interpreter read-only field shows the path to the new interpreter.

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

    For more information, refer to Configuring a package manager for a project.

When you click OK, you return to the Node.js page where the Node interpreter field shows the new interpreter.

Last modified: 11 October 2024