WebStorm 2019.3 Help

Node.js and NPM

File | Settings | Languages and Frameworks | Node.js and NPM for Windows and Linux
WebStorm | Preferences | Languages and Frameworks | Node.js and NPM for macOS
Ctrl+Alt+S the Settings/Preferences icon


This page appears in the Settings dialog, when the Node.js plugin is enabled. The plugin is activated by default. If the plugin is disabled, enable it on the Plugins page as described in Managing plugins.

Item

Description

Node interpreter

In this field, specify the default Node.js interpreter for the current project. WebStorm 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 ESLint.

Select a configured interpreter from the list or click the Browse button and configure a new one in the dialog that opens as described in Configuring a local Node.js interpreter. If you select 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 accessible from the Run/Debug Configuration: Node.js. See Node.js with Docker, Node.js via SFTP, Node.js via SSH, and Node.js with Vagrant for details.

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, WebStorm 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, WebStorm displays information about the currently configured version.

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 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.

Package manager

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

WebStorm uses the npm and yarn aliases for the current system paths to these managers. To use a custom installation, click Select, and select the installation folder of the relevant package manager, see Configuring a package manager for a project for details.

By default, WebStorm suggests npm. However if you open a project with a yarn.lock file and Yarn is installed on your machine, WebStorm automatically changes the package manager for this project to Yarn. You can also set Yarn as default WebStorm package manager.

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 Upgrade.

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

  • Click Uninstall to have the selected package removed.

  • Click Upgrade 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: 24 November 2019