RubyMine 2017.2 Help

Node.js and NPM

File | Settings | Languages and Frameworks | Node.js and NPM for Windows and Linux
RubyMine | Preferences | Languages and Frameworks | Node.js and NPM for macOS
Ctrl+Alt+S
/help/img/idea/2017.2/settings.png

This page appears in the Settings dialog box, when the Node.js plugin is enabled. The plugin is not bundled with RubyMine, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

ItemDescription
Node interpreter In this field, specify the local Node.js interpreter to use. Choose the interpreter from the drop-down list or click /help/img/idea/2017.2/browseButton.png and choose the interpreter in the dialog box that opens.

The term local Node.js interpreter denotes a Node.js installation on your computer. The term remote Node.js interpreter denotes a Node.js installation on a remote host or in a virtual environment set up in a Vagrant instance. On the Node.js and NPM page, you can specify only local interpreters. Remote interpreters are configured in the Configure Node.js Remote Interpreter Dialog dialog which can be accessed only from the Run/Debug Configuration: Node.js dialog. See Configuring Node.js Interpreters for details.

VersionThis read-only field shows the current version of the runtime environment.
Code Assistance 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. RubyMine provides the ability to configure these sources as a JavaScript library and associate it with your project.
  • If the Node.js core module sources are not set up, RubyMine displays a notification Node.js Core Library is not enabled with an Enable button. Click this button to have RubyMine configure Node.js Core sources automatically.

    When the configuration is completed, RubyMine displays information about the currently configured version, the notification Node.js Core Library is enabled, and adds two buttons: the Disable button and the Usage scope button.

  • If the library is set up, RubyMine displays information about the currently configured version, the notification Node.js Core Library is enabled, and adds two buttons: the Disable button and the Usage scope button.
    • Click the Disable button to discard the configuration of the Node.js Core libraries in the current project.
    • Click the Usage scope button to associate the desired directories with libraries.

If necessary, configure the scope in which the Node.js Core sources are treated as libraries. Click the Usage scope button, in the Usage Scope dialog box that opens click the desired directories, and select the newly configured Node.js core module sources library from the drop-down list.

Packages A number of tools are started through Node.js, for example, the CoffeeScript, TypeScript, and Less compilers, YUI, UglifyJS, and Closure compressors, Karma test runner, Grunt task runner, etc. The Node Package Manager (npm) is the easiest way to install these tools, the more so that you have to install Node.js anyway. 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 a blue arrow /help/img/idea/2017.2/arrow_right.png.
  • Click /help/img/idea/2017.2/new.png to have a new package installed. In the Available Packages dialog box that opens, select the relevant package. To have the package installed globally, select the Options check box and type -g in the Options text box. Global installation makes the package available at the RubyMine level so it can be used in any RubyMine project. Click Install Package when ready.
  • Click /help/img/idea/2017.2/delete.png to have the selected package removed.
  • Click /help/img/idea/2017.2/arrowUp.png 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: 26 October 2017

See Also