node.js plugin: upgrading to a new version of node can leave IDEA looking at the old cached source code

IDEA 11.1.5, build IU-117.1043, Java 1.7.0_21 64-bit.  Node.js plugin 0.2.2

I use nvm to upgrade and select my version of node.js. I also update the IDEA node.js binary and source locations and keep the debug configuration up-to-date.  

But when I have upgraded to a new version of node (currently 0.10.5), and run the debugger, I often find that IDEA is using a cached version of the old source code (in this case 0.8.22 in system/extLibs).
This causes very strange debugging behavior if you need to step into node's code.  

Workaround: exit idea and remove every node.js source directory from .IntelliJIdea11/system/extLibs/ except the source for the version you are currently using.  Restart IDEA and it will now find the right source code.


1 comment
Comment actions Permalink

John, open Settings dialog, select JavaScript | Libraries there. See screenshot:
Locate there a set of libraries with name "Node.js ${version} Core Library". Select a needed library (check "Enabled" column) and unselect others (or remove them - it's even better).
If there isn't the needed library in this list, remove all "Node.js ${version} Core Library" libraries and configure Node.js sources one more time (JavaScript | Node.js).
Hope that will help.
There will be no such problem in IDEA 13, because there will be only one Node.js library (without version in its name).


Please sign in to leave a comment.