Configuring Node.js in CLion

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.

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