【问题标题】:ENOTFOUND error while installing 'express' in Node.js - Windows在 Node.js 中安装“express”时出现 ENOTFOUND 错误 - Windows
【发布时间】:2012-05-26 18:56:41
【问题描述】:

我正在尝试通过我的 Windows 7 CMD 安装 Node.js 的 express 包。

我做了一个

npm install express

我收到以下错误:

npm ERR! Error: getaddrinfo ENOENT
npm ERR!     at errnoException (dns.js:31:11)
npm ERR!     at Object.onanswer [as oncomplete] (dns.js:140:16)

 npm ERR! cwd D:\node
    npm ERR! node -v v0.6.15
    npm ERR! npm -v 1.1.16
    npm ERR! syscall getaddrinfo
    npm ERR! code ENOTFOUND
    npm ERR! message getaddrinfo ENOENT
    npm ERR! errno {}
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR!     D:\node\npm-debug.log
    npm not ok

我在防火墙后面工作。是不是偶然,这背后的原因?

非常感谢!

【问题讨论】:

    标签: windows node.js npm


    【解决方案1】:

    用管理员运行 cmd 就可以了。

    【讨论】:

    • 如果它在生产中,它不会解决问题:安全威胁。
    猜你喜欢
    • 1970-01-01
    • 2016-03-07
    • 1970-01-01
    • 2020-01-28
    • 2013-07-02
    • 1970-01-01
    • 2021-04-01
    • 2016-04-18
    • 2016-02-25
    相关资源
    最近更新 更多