IntelliJ IDEA 2018.2 Help

Node.js and NPM

File | Settings | Languages and Frameworks | Node.js and NPM for Windows and Linux
IntelliJ IDEA | Preferences | Languages and Frameworks | Node.js and NPM for macOS
Ctrl+Alt+S icons general settings svg


This page appears in the Settings dialog box, when the Node.js plugin is enabled. The plugin is not bundled with IntelliJ IDEA, but it can be installed from the JetBrains plugin repository as described in Managing Plugins.

Item

Description

Node interpreter

In this field, specify the default Node.js interpreter for the current project. IntelliJ IDEA will automatically use it every time you select the Project alias from Node Interpreter lists when creating run/debug configurations or configuring Node.js-dependent tools, for example, Prettier or Yeoman.

Choose the interpreter from the drop-down list or from the dialog that opens when you click browseButton. If you choose node, the system Node.js version is used.

Here you can choose or configure only a local Node.js interpreter, that is, a Node.js installed on your computer, or a Node.js on Windows Subsystem for Linux, see Configuring a local Node.js interpreter and Using Node.js on Windows Subsystem for Linux for details.

Remote interpreters are configured in the Configure Node.js Remote Interpreter Dialog dialog accessible from the Run/Debug Configuration: Node.js. Learn more from Configuring Remote Node.js Interpreters.

Version

This read-only field shows the current version of Node.js.

Coding assistance for Node.js

Select this checkbox to configure the Node.js Core module sources as a JavaScript library and associate it with your project. As a result, IntelliJ IDEA provides code completion, reference resolution, validation, and debugging capabilities for fs, path, http, and other core modules that are compiled into the Node.js binary.

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

Optionally
Configure the scope in which the Node.js Core sources are treated as libraries:

  1. Click Manage scopes. The Usage Scope dialog opens.

  2. Click the relevant directories, and for each of them select the newly configured Node.js Core library from the list.

Packages

The Packages area shows a list of all the NPM-dependent packages that are currently installed on your computer.
  • Package: this read-only field shows the name of a package, exactly as it should be referenced if you were installing it in the command line mode.

  • Version: this read-only field shows the version of the package installed on your computer.

  • Latest: this read-only field shows the latest released version of the package. If a package is not up-to-date, it is marked with a blue arrow icons vcs arrow right.

  • Click icons general add svg to have a new package installed. In the Available Packages dialog box that opens, select the relevant package. To have the package installed globally, select the Options checkbox and type -g in the Options text box. Global installation makes the package available at the IntelliJ IDEA level so it can be used in any IntelliJ IDEA project. Click Install Package when ready.

  • Click icons general remove svg to have the selected package removed.

  • Click icons actions previousOccurence svg to have the current version of the selected package replaced with the latest released version. The button is enabled only when the selected project is not up-to-date.

Last modified: 20 November 2018

See Also

Language and Framework-Specific Guidelines: