【问题标题】:Unable to install browser-sync on windows 7无法在 Windows 7 上安装浏览器同步
【发布时间】:2016-06-22 06:18:49
【问题描述】:

我正在尝试在安装 NodeJs 后在 Windows 7 上安装浏览器同步。但我收到以下错误:

C:\Users\nikhil.wagh>npm install -g browser-sync
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "browser-sync"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 23.235.39.162:443
npm ERR!     at Object.exports._errnoException (util.js:870:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:893:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
npm ERR!  { [Error: connect ECONNREFUSED 23.235.39.162:443]
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '23.235.39.162',
npm ERR!   port: 443 }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\nikhil.wagh\npm-debug.log

【问题讨论】:

  • 您是否以管理员权限运行命令提示符?

标签: browser-sync


【解决方案1】:

您的环境变量可能有问题:-

你的环境变量有问题:

Control panel -> System -> Advanced System Settings -> Advanced -> Environment variables.

在环境变量中搜索 PATH 变量。 PATH 变量必须包含以下路径:

C:\Users\[your username]\AppData\Roaming\npm

C:\Program Files (x86)\nodejs\

检查你应该在 PATH 变量中有 2 个路径,并且

C:\Users\[your username]\AppData\Roaming\npm is beforeC:\Program Files (x86)\nodejs\

来源:-npm installation problem in windows

【讨论】:

    猜你喜欢
    • 2020-09-28
    • 1970-01-01
    • 2012-04-08
    • 1970-01-01
    • 1970-01-01
    • 2015-11-13
    • 2020-03-17
    • 2012-11-25
    • 2013-03-02
    相关资源
    最近更新 更多