0

I just installed Node.js on my Windows 7 machine, added it to the PATH and tried to use it. npm works perfectly (at least for now) and node --version prints v4.1.2.

However, when I try to execute another command like node update it appends the command to the current working directory and, of course, fails :

$ node help
module.js:338
    throw err;
    ^

Error: Cannot find module 'c:\path\to\working\directory\help'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:118:18)
    at node.js:952:3

What can I do?

  • What are you trying to do? If you want node help, type `node --help`. If you want to update node, see http://stackoverflow.com/questions/8191459/how-to-update-node-js. When you type `node whatever`, node will look for a file called `whatever` in the current directory and try to execute it. – Joel Lee Oct 20 '15 at 21:33
  • You are totally right! Thanks for the clarification. – Ahmed Saoudi Oct 20 '15 at 21:46

0 Answers0