The issue is not with `node` executable path, the problem is that you
installed the module on the same folder as the executable. The modules
should be installed on the root folder of your project.
Your project structure should be something like that:
.
├── index.js
└── node_modules
└── xls-to-json
├── README.md
├── index.js
├── libs
├── node_modules
├── package.json
├── sample
└── test
Le mardi 2 septembre 2014 15:38:33 UTC-3, HansPeterSloot a écrit :
>
> 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?
>
> 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.
>>
>>
>> Try moving the `node_modules` folder to `c:\cygwin64\home\nl19856\`
>>
>> []s
>>
>>
>> On 29 August 2014 15:02, HansPeterSloot <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I have installed xls-to-json but it does not seem to work.
>>>
>>> How can I fix this?
>>>
>>> Regards HansP
>>>
>>> C:\Program Files\nodejs>npm install xls-to-json
>>> [email protected] node_modules\xls-to-json
>>> ├── [email protected]
>>> └── [email protected] ([email protected], [email protected], [email protected], [email protected])
>>>
>>> C:\Program Files\nodejs>node c:\cygwin64\home\nl19856\xls2json.js
>>>
>>> module.js:340
>>> throw err;
>>> ^
>>> Error: Cannot find module 'xls-to-json'
>>> at Function.Module._resolveFilename (module.js:338:15)
>>> at Function.Module._load (module.js:280:25)
>>> at Module.require (module.js:364:17)
>>> at require (module.js:380:17)
>>> at Object.<anonymous> (c:\cygwin64\home\nl19856\xls2json.js:1:75)
>>> at Module._compile (module.js:456:26)
>>> at Object.Module._extensions..js (module.js:474:10)
>>> at Module.load (module.js:356:32)
>>> at Function.Module._load (module.js:312:12)
>>> at Function.Module.runMain (module.js:497:10)
>>>
>>> --
>>> Job board: http://jobs.nodejs.org/
>>> New group rules:
>>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>>> Old group rules:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/nodejs/9fffa9f3-c96f-4ece-9239-2f65d8793707%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/nodejs/9fffa9f3-c96f-4ece-9239-2f65d8793707%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/95621930-8635-4876-969f-0ed7f966c659%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.