IntelliJ IDEA 2017.1 Help

JavaScript-Specific Guidelines

This feature is supported in the Ultimate edition only.

With IntelliJ IDEA, you can develop modern web, mobile, and desktop applications with JavaScript and Node.js. IntelliJ IDEA supports JavaScript and TypeScript programming languages, React and Angular frameworks and provides tight integration with various tools for web development.

On this page:


Before you start working with JavaScript, make sure that the JavaScript Support plugin is enabled. The plugin is bundled with IntelliJ IDEA and is activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.

JavaScript support

JavaScript files are marked with /help/img/idea/2017.1/viewAsJSON.png icon.

JavaScript support in IntelliJ IDEA includes:

Developing an application that contains JavaScript: general overview

Developing an application that contains JavaScript, generally, includes performing the following steps:

  1. Create a project to implement your application. On the first page of the New Project wizard, select Static Web.
  2. On the JavaScript page of the Settings dialog box, choose the JavaScript language version that you are going to use in your project.
  3. Install the project dependencies via the Node Package Manager by doing one of the following:
      1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for macOS, and click Node.js and NPM under Languages & Frameworks.
      2. On the Node.js and NPM page that opens, the Packages area shows all the Node.js-dependent packages that are currently installed on your computer, both at the global and at the project level. Click /help/img/idea/2017.1/new.png.
      3. In the Available Packages dialog box that opens, select the required package.
      4. Optionally specify the product version and click Install Package to start installation.
    • Right-click the package.json file in the editor or in the Project tool window and choose Run 'npm install' on the context menu.
    • Open the built-in Terminal (View | Tool Windows | Terminal) and run the npm install <required_package> commands.
    • Install the required packages on the Node.js and NPM page of the Settings / Preferences Dialog.

    For details, see Installing and Removing External Software Using Node Package Manager.

  4. Populate the project. Use the following IntelliJ IDEA facilities, where applicable:
  5. Improve the quality and maintainability of your code using various types of refactorings, built-in code quality tools, and integration with other linters, see Using JavaScript Code Quality Tools.
  6. Run your application by opening its starting HTML page in the IntelliJ IDEA default browser.
  7. Debug your application in the Google Chrome browser.

    The JavaScript debugging functionality is incorporated in IntelliJ IDEA, so just configure the debugger, whereupon you can start the debugging session and proceed as usual: set the breakpoints, step through them, stop and resume the program, and examine it when suspended.

In this section

See Also

Language and Framework-Specific Guidelines:

Last modified: 18 July 2017