The following is only valid when Node.js Plugin is installed and enabled!
In this section:
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
- Download and install the Node.js runtime environment.
- 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
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for macOS, and click Node.js and NPM under Languages & Frameworks. The Node.js and NPM page opens.
- In the Node Interpreter field, specify the local Node.js interpreter to use. Choose the interpreter from the drop-down list or click and choose the interpreter in the dialog box that opens.
- 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 (