IntelliJ IDEA 2017.2 Help


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:

JavaScript support

JavaScript files are marked with viewAsJSON 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 new.
      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 NPM.

  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 JavaScript Linters.
  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.

Last modified: 29 November 2017

See Also

Language and Framework-Specific Guidelines: