How to import existing node.js module into Intellij IDEA?

Well, I’ve figured out a workaround, but not sure if it’s the best solution. One can just create a new project of type “Web”, and point it to the directory containing the module’s sources. Then IDEA understands the whole structure, and you can create run configurations with Node.js.

In order to get additional Node features, like Intellisense for standard Node APIs, you’ll still want to configure the project to be a Node project:

  1. Open the Preferences window
  2. Click Languages & Frameworks → Node.js and NPM
  3. In the section Coding Assistance you’ll see if Node.js Core library is [not] enabled. If it is enabled, there’s nothing more to do. If not click the Enable button
  4. Leave For the whole project checked, and click Configure
  5. The text should now change to Node.js Core library is enabled.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)