PyCharm 2024.1 Help

Node.js

This page appears only when the Node.js bundled plugin is enabled in the Installed tab of the Settings | Plugins page as described in Install plugins.

The following Node.js versions are supported in PyCharm 2023.3 and later:

  • Node.js 20 - the Active Long Term Supported (LTS) version

  • Node.js 21 - the current version

Learn more from Supported Node.js versions

Item

Description

Node interpreter

In this field, specify the default Node.js interpreter for the current project. PyCharm automatically uses it every time you select the Project alias from Node Interpreter lists, for example, when creating run/debug configurations.

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. For more information, refer to Configuring a local Node.js interpreter and Using Node.js on Windows Subsystem for Linux.

Remote interpreters are configured in the Configure Node.js Remote Interpreter dialog accessible from the Run/Debug Configuration: Node.js. For more information, refer to Node.js with Docker, Node.js via SSH, and Node.js with Vagrant.

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, PyCharm 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, PyCharm 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, Yarn, or pnpm) for the current project.

PyCharm 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. For more information, refer to Configuring a package manager for a project.

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

You can also set Yarn 1 or pnpm as default PyCharm package manager.

Last modified: 25 June 2024