Trouble installing NPM on windows 7

100 views
Skip to first unread message

Nodenoob

unread,
Oct 18, 2014, 5:15:57 PM10/18/14
to nod...@googlegroups.com
Hello everyone, 

so I'm trying to install node and bower on my computer but I'm having some difficulty doing so. The MSI installer isn't working for me (Despite going through the Windows 7 troubleshooting guide and resetting the services.msc registry files) so I installed node.exe manually and set its path correctly. I'm able to execute "node" in gitbash so I think it's working fine. I also downloaded npm (http://nodejs.org/dist/npm/) and unzipped it in the same directory. I tried setting different paths such as  C:\node\node_modules\npm\bin\npm and  C:\node\node_modules\npm\bin\ but every time I run npm install bower from gitbash I get the following error: sh: npm: command not found

Anyone have any ideas or suggestions? I'd highly appreciate it!

Forrest Norvell

unread,
Oct 18, 2014, 5:56:29 PM10/18/14
to nod...@googlegroups.com

The MSI installer isn’t working for me

Exactly how does it fail? I ask because installing and upgrading npm on Windows is much easier to get right when you’re starting from the basis provided by the MSI.

I also downloaded npm (http://nodejs.org/dist/npm/) and unzipped it in the same directory.

For whatever reason, the Node maintainers are no longer updating that directory (and nobody on the npm team is permitted to upload to it). The newest version there is now out of date, as the latest stable version of npm is 2.1.4.

What happens when you run node C:\node\node_modules\npm\bin\npm-cli.js version? If that works, you should be able to copy C:\node\node_modules\npm\bin\npm.cmd to C:\node, and then just make sure that C:\node is on your path. (I’m unsure why having C:\node\node_modules\npm\bin in %PATH% is insufficient.)

yr friendly neighborhood npm maintainer


--
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 nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/a4e97fa3-cc50-41b1-95a2-7573a901862c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nodenoob

unread,
Oct 18, 2014, 7:14:13 PM10/18/14
to nod...@googlegroups.com
Really appreciate your taking the time to answer me Forrest. I would gladly use the MSI installer but it doesn't work at all on my machine. I'm getting a new laptop in a couple of weeks so crossing my fingers Nodejs runs well on Windows 8!

I get an error message:

Error: Cannot find module 'C:\Windows\System32\nodenode_modulesnpmbinnpm-cli.js'

    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

So that looks like some strange pathing error? 

Forrest Norvell

unread,
Oct 20, 2014, 5:51:37 PM10/20/14
to nod...@googlegroups.com

I get an error message:


Error: Cannot find module 'C:\Windows\System32\nodenode_modulesnpmbinnpm-cli.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

So that looks like some strange pathing error?

It looks as if the path isn’t being escaped properly (backslash must be escaped in JavaScript strings: "\\"). Which version of Windows 7, and which MSI? I was assuming it was the 0.10.32 one, but maybe not?

F


Reply all
Reply to author
Forward
0 new messages