node.js 和 npm 在 windows 7 64 位旗舰版中没有网络访问权限 [英] node.js and npm has no network access in windows 7 64 bit ultimate

查看:78
本文介绍了node.js 和 npm 在 windows 7 64 位旗舰版中没有网络访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:对于遇到此问题的任何其他人,我尝试了所有建议和所有研究.最后我格式化了硬盘并重新安装了Windows.即使它从一开始就是全新安装,一些 Windows 安装似乎根本无法与 node.js 一起使用.据我所知,这是唯一的解决方案.

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.

所以首先,我已经找到了类似的问题:基本的 Node.js 示例不适用于 Windows 7,这似乎是相同的问题,但没有解决方案.我也在网上找到论坛帖子,但没有解决方案,但很多人都在发同样的问题.

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.exenpm 似乎都没有网络访问权限.npm install 发送获取请求,但从未得到响应.访问 mongodb 的节点脚本永远不会发送连接请求.我将此代码从旧机器复制到新机器上.这是我放在新机器上的第一件事.旧机器运行 Windows 7 64 家庭高级版和新的 Windows 7 64 终极版.我已经尝试了所有兼容模式,以管理员身份运行,禁用 Windows 防火墙,还没有防病毒软件,我卸载/重新安装,并且即使从旧计算机到新计算机的版本相同,我也尝试更改版本.我搜索过 stackoverflow 和互联网,发现其他人也有这个问题,但没有解决方案.我有一个可以成功运行 node 的虚拟机 ubuntu vm,但是如果可能的话,我希望能够在没有 vm 的情况下运行它,而且我似乎找不到任何问题的原因.甚至两台计算机之间的 OEM 软件也几乎相同,因为旧的是外星人 m15x,而新的是 m14x.任何帮助表示赞赏.

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.

我目前使用的是最新版本 (0.6.10).运行 npm install 并挂起后,我使用 netstat 并在 node.exe 下得到以下结果:

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

现在,当我在 node.js 主页上运行示例服务器时,我无法在浏览器中获取 hello world 但是连接在 netstat 中:

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

编辑 2:

所以我尝试禁用所有其他连接.. 不走运.然后我尝试在 eclipse 中使用调试器,即使 eclipse 也找不到 vm 的调试器在端口 5858 上广播.它实际上只是没有连接.因此,除非有人最终除了擦拭硬盘驱动器和重新安装 Windows 之外还有其他任何想法,否则我认为这台计算机将作为 DOA 重新使用外星人软件.希望下一个没有这个问题.感谢所有在评论中提出建议的人以及所有试图为我调查解决方案的人.

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.

推荐答案

如果您位于可能需要在节点上设置代理配置的公司网络后面.它运行这样的东西

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.

这篇关于node.js 和 npm 在 windows 7 64 位旗舰版中没有网络访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆