CLion 2021.1 Help

Node.js and NPM

Before you start, make sure the Node.js plugin is installed on the Settings/Preferences | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains repository.

The following Node.js versions are supported in CLion 2020.3:

  • Node.js 10

  • Node.js 12

  • Node.js 14

  • Node.js 15

Learn more from Supported Node.js versions

ItemDescription
Node interpreter

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

VersionThis read-only field shows the current version of Node.js.
Package manager

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

CLion uses the npm, yarn, and pnpm 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, CLion suggests npm. However if you open a project with a yarn.lock file and Yarn is installed on your computer, CLion automatically changes the package manager for this project to Yarn.

Accordingly, if you open a project with a pnpm-lock file and pnpm is installed on your computer, CLion automatically changes the package manager for this project to pnpm.

You can also set Yarn 1 or pnpm as default CLion 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 CLion level so it can be used in any CLion 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: 16 July 2021