CLion 2017.1 Help

Node.js

In this section:

Introduction

CLion supports integration with the Node.js runtime environment thus enabling running, debugging, and unit testing of Node.js applications.

CLion recognizes Node.js code and provides basic coding assistance and highlighting for it. To get guidance in Node development, see HowToNode.org.

Before you start

  1. Download and install the Node.js runtime environment.
  2. Install and enable the NodeJS plugin. The NodeJS plugin is not bundled with CLion, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

The Node.js plugin introduces the following changes to the CLion UI:

  • Node.js page is added to the Settings dialog box.
  • Run/debug configurations are added.

Configuring Node.js in CLion

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or CLion | Preferences for macOS, and click Node.js and NPM under Languages & Frameworks. The Node.js and NPM page opens.
  2. In the Node Interpreter field, specify the local Node.js interpreter to use. Choose the interpreter from the drop-down list or click /help/img/idea/2017.1/browseButton.png and choose the interpreter in the dialog box that opens.
  3. In the Code Assistance area, configure the Node.js core module sources if they are not configured yet.

    When developing a Node.js application it can be convenient to have code completion, reference resolution, validation, and debugging capabilities for Node core modules (fs, path, http, etc.). However, these modules are compiled into the Node.js binary. CLion provides the ability to configure these sources as a JavaScript library and associate it with your project.

See Also

Last modified: 19 July 2017