Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node.js and npm has no network access in windows 7 64 bit ultimate

Tags:

NOTE: to anyone else who has this problem, I tried all suggestions and all research. In the end I formatted the hard drive and reinstalled windows. Even though it was a fresh install from the start some windows installations just appear to not work at all with node. As far as I know this is the only solution.

So to start with, I already found the similar question: Basic Node.js examples not working on Windows 7 which seems to be the same issue but there is no solution. I have also found forum posts online with no solutions but many people posting the same issues.

Node.exe and npm both appear to have no network access. npm install sends the get requests and never get a response. Node scripts that go to access a mongodb never send the connection request. I copied this code from my old machine to my new one. It was the first thing i put on the new machine. The old machine was running windows 7 64 home premium and the new one windows 7 64 ultimate. I've tried all compatibility modes, running as administrator, disabling windows firewall, there is no antivirus yet, i uninstalled/reinstalled, and I've tried changing the versions even though the version from old computer to new are the same. I've searched stackoverflow and the internet and have found others with the problem but no solutions. I have a virtual box ubuntu vm that can run node successfully however I would like to be able to run it without a vm if possible and I can't seem to find any cause of the problems. Even OEM software between the two computers are nearly identical since the old was an alienware m15x and the new is an m14x. Any help is appreciated.

edit:

I'm using the latest version currently (0.6.10). After running npm install and having it hang, i used netstat and got the following results under node.exe:

 [node.exe]    TCP    10.20.21.225:49690     ec2-107-20-159-167.compute-1.amazonaws.com:https                       ESTABLISHED   [node.exe]    TCP    10.20.21.225:49691     nuq04s08-in-f31.1e100.net:https  TIME_WAIT    TCP    10.20.21.225:49692     fa-in-f94.1e100.net:https  TIME_WAIT    TCP    10.20.21.225:49693     nuq04s08-in-f19.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49696     nuq04s08-in-f25.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49702     nuq04s08-in-f6.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49703     nuq04s08-in-f25.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49704     nuq04s08-in-f25.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49706     nuq04s08-in-f26.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49707     nuq04s08-in-f26.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49708     nuq04s08-in-f26.1e100.net:http  TIME_WAIT    TCP    10.20.21.225:49709     nuq04s08-in-f26.1e100.net:http  TIME_WAIT 

Now when I run the example server on the node.js homepage, I cannot get the hello world in the browser however the connection is in netstat:

  [node.exe]    TCP    127.0.0.1:1337         Robbie-PC:49805        ESTABLISHED   [node.exe]    TCP    127.0.0.1:7789         Robbie-PC:49158        ESTABLISHED 

but when i wait a little while it changes to:

  [node.exe]    TCP    127.0.0.1:1337         Robbie-PC:49805        CLOSE_WAIT   [node.exe]    TCP    127.0.0.1:7789         Robbie-PC:49158        ESTABLISHED 

edit 2:

so I tried disabling all other connections.. no luck. Then I tried to use the debugger in eclipse, even eclipse couldn't find the vm's debugger broadcasting on port 5858. It literally just has no connection. So unless someone finally has any other ideas aside from wiping the hard drive and reinstalling windows, then I think this computer is going back to alienware as DOA. lets hope the next one doesn't have this problem. Thanks to all those who suggested things in the comments and to everyone who attempted to investigate a solution for me.

like image 775
user1084563 Avatar asked Feb 10 '12 01:02

user1084563


People also ask

Is node JS compatible with Windows 7 64 bit?

Normally old operating system needs an old version of Node. JS. you can refer to old version of Node. JS here, you can also download this one, which is tested and working fine with Win7( win7 Ultimate v6.

Does node JS 14 support Windows 7?

I wanted to install React Native on my Windows 7 PC, but to install React Native we need Nodejs 14 or above... But Nodejs 14 isn't supported for Windows 7...


1 Answers

If you are behind a corporate network which probably needs proxy configuration on node to be setup. It runs something like this

npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080 

Replace the proxy company name to whatever your network uses.

like image 140
user2171543 Avatar answered Apr 05 '23 10:04

user2171543