I\'m encountering a strange behaviour with instanceof in NodeJs. I\'m trying to creating a module which throws exceptions which can be caught by consuming modules and dealt
Cannot reproduce the problem. Working for me using version 0.12 and 4.0.0 (tested both).
What you should consider in future is that you reference your OWN modules using relative paths (absolute ones are not system independent). If you don't, you normally reference core modules of Node.js directly or NPM installed ones. So change 'mymodule' to './mymodule' (change path accordingly).