Reputation: 9216
Does anyone know why intellij IDEA underlines require? How can I fix this?
Upvotes: 11
Views: 7252
Reputation: 1377
I don't know why my version isn't quite the same (new version? Fresh install?) but my IntelliJ Ultimate didn't have the Node.js Core library @SergioFilhow mentioned.
I had to go to File > Settings > Languages & Frameworks > Node.js and NPM
: "Coding assistance for Node.js". After I configured this for my projects, the Node.js Core library showed up under Languages & Frameworks > JavaScript > Libraries
.
Upvotes: 6
Reputation: 469
I had the same problem on windows, with IntelliJ IDEA 15.0.3. The solution was:
File -> Settings -> Languages & Frameworks -> Nodejs and NPM: Click "Enable" button next to Node.js Core library, accept defaults.
Upvotes: 17
Reputation: 1146
Open preferences page and select Languages & Frameworks > Javascript > Libraries
and select Node.js Globals
, just like the image below.
No need to add Node.js core modules (I didn't add and worked the same way)
Upvotes: 16