Reputation:
I have installed Node.js on windows with the installer and tried running the npm command but it won't run. When I typed in the following.
npm install socket.io
I got this
module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'C:\Windows\System32\node_modules\npm\bin\npm-cli.js'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)
When i typed
npm
I got this
module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'C:\Windows\System32\node_modules\npm\bin\npm-cli.js'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)
I checked and I have the npm-cli.js file in the right spot. How do i get the npm command to work. Do I need to set an enviormental variable to the npm-cli.js file? If I do, can you lead me througgh the process?
Upvotes: 2
Views: 1914