On Sep 2, 2014, at 1:38 PM, HansPeterSloot wrote:
> Op zaterdag 30 augustus 2014 23:09:46 UTC+2 schreef Tadeu Zagallo:
>> I think the module should be installed on the same folder as your application.
>
> When I put the code in the same directory as the node executable the error disappeared.
>
> But I consider that more or less 'dirty'.
> How can I separate the code from the executables?
You don't need to put your JavaScript file in the same directory as the node executable. Rather, you need to put the node_modules folder in the same directory as your JavaScript file. And this is accomplished by running the "npm install ..." command in the same directory as your JavaScript file. Each node project gets its own node_modules folder containing only the modules it asks for.