JetBrains Rider 2019.2 Help

Node.js

Node.js is a lightweight runtime environment for executing JavaScript on the server side. 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, you need to configure Node.js as a local interpreter.

To run a Node.js application remotely, configure it as a remote interpreter.

To configure Node.js interpreters, install the NodeJS plugin on the Plugins page as described in Managing plugins.

Configuring a local Node.js interpreter

  1. Press Ctrl+Alt+S to open the Settings/Preferences dialog and then go to Languages and Frameworks | Node.js and NPM.

  2. On the Node.js and NPM page, that opens, click the Browse button next to the Node Interpreter list.

  3. In the Node.js Interpreters dialog that opens with a list of all the currently configured interpreters, click the Add button on the toolbar. In the dialog that opens, choose Add Local from the context menu and choose the local 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 chosen interpreter.

  4. In the Package manager field, choose the package manager (npm or Yarn) to use in the current project, see Configuring a package manager for a project for details.

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

Using a system Node.js version

With JetBrains Rider, you can set the default system node alias as your project’s Node.js version. This means that if you install a new node version and make it the default in your system, all the tools and run configurations in JetBrains Rider where this system alias is specified in the Node.js interpreter field will use this newer version.

  1. Press Ctrl+Alt+S to open the Settings/Preferences dialog and then go to Languages and Frameworks | Node.js and NPM.

  2. From the Node interpreter list, choose node.

    ws_node_alias.png

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

Last modified: 20 August 2019

See Also