Why does Intellij IDEA shows require undefined with nodejs?
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
.
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)
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.