代理返回HTML后的NPM

安德烈·奥格尔(Andre Ogle)

我是NPM的新手,我认为我终于可以使用以下设置来通过公司代理:

proxy = http://MyUsername:MyPassword@MyProxy:MyPort
https-proxy = http://MyUsername:MyPassword@MyProxy:MyPort
strict-ssl = false
registry = http://registry.npmjs.org/

但是,当我运行NPM命令(例如npm search或)时npm --proxy http://username:[email protected]:80 install packagename,出现以下错误,我不理解:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'search' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 warn Building the local index for the first time, please be patient
6 verbose url raw /-/all
7 verbose url resolving [ 'http://registry.npmjs.org/', './-/all' ]
8 verbose url resolved http://registry.npmjs.org/-/all
9 info trying registry request attempt 1 at 15:32:46
10 http GET http://registry.npmjs.org/-/all
11 http 407 http://registry.npmjs.org/-/all
12 verbose bad json <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
12 verbose bad json <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
12 verbose bad json <head>
12 verbose bad json
12 verbose bad json <title>Error Message</title>
12 verbose bad json <meta http-equiv="content-type" content="text/html; charset=utf-8" />
12 verbose bad json
12 verbose bad json <style>
12 verbose bad json body {
12 verbose bad json
12 verbose bad json     background:#e5eaf5 url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/bg.gif) top left repeat-x ;
12 verbose bad json     margin:0px 0px 0px 0px;
12 verbose bad json     font-family:Arial, Helvetica, sans-serif;
12 verbose bad json     min-width:1000px;
12 verbose bad json     font-size:12px;
12 verbose bad json     color:#000000;
12 verbose bad json     direction:ltr;
12 verbose bad json     }
12 verbose bad json img {border:none}
12 verbose bad json
12 verbose bad json
12 verbose bad json     .main {
12 verbose bad json         width:100%;
12 verbose bad json         background:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/topright.gif) top right no-repeat;
12 verbose bad json         min-width:1000px;
12 verbose bad json         min-height:400px;
12 verbose bad json         margin-left:auto;
12 verbose bad json         margin-right:auto;
12 verbose bad json         text-align:left;
12 verbose bad json     }
12 verbose bad json
12 verbose bad json     .logo {float:left;  height:103px; }
12 verbose bad json     .sidetext {float:right; width:182px; height:52px; background:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/sidetext.png) top left; border:1px solid #2a2e31; margin-right:20px; margin-top:20px; padding:4px; }
12 verbose bad json     .sidetextNone {visibility:hidden; }
12 verbose bad json
12 verbose bad json     .whiteline {float:left; clear:both; font-size:20px; margin-left:47px; margin-top:17px; color:#ffffff; white-space:nowrap; }
12 verbose bad json     .bold {font-weight:bold;}
12 verbose bad json
12 verbose bad json     .maintext {float:left; margin-top:20px; clear:both; color:#000; margin-left:47px;}
12 verbose bad json
12 verbose bad json     .color1 {color:#677183;}
12 verbose bad json
12 verbose bad json     ul {margin-top:0; padding-left:15px; padding-top:5px; padding-bottom:5px;}
12 verbose bad json
12 verbose bad json     ul li {list-style-image:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/bullet.gif)}
12 verbose bad json     A {
12 verbose bad json     FONT-WEIGHT: bold; COLOR: #005a80;
12 verbose bad json }
12 verbose bad json A:hover {
12 verbose bad json     FONT-WEIGHT: bold;COLOR: #0d3372;
12 verbose bad json }
12 verbose bad json </style>
12 verbose bad json
12 verbose bad json </head>
12 verbose bad json <body>
12 verbose bad json     <div class="main">
12 verbose bad json         <div class="logo"><img src="/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/logo.png" alt="ForeFront" /></div>
12 verbose bad json         <div class="whiteline"><td id=L_default_2><span class="bold">Network Access Message:</span> The page cannot be displayed </td></div>
12 verbose bad json     <div class="maintext">
12 verbose bad json     <td id=L_default_3><span class="bold color1">Explanation:</span> There is a problem with the page you are trying to reach and it cannot be displayed. </td><br />
12 verbose bad json <br />
12 verbose bad json
12 verbose bad json <td id=L_default_5><span class="bold color1">Try the following:</span></td><br />
12 verbose bad json
12 verbose bad json <ul>
12 verbose bad json <li><td id=L_default_6><span class="bold">Refresh page:</span> Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion.</td></li>
12 verbose bad json <li><td id=L_default_7><span class="bold">Check spelling:</span> Check that you typed the Web page address correctly. The address may have been mistyped.</td></li>
12 verbose bad json <li><td id=L_default_8><span class="bold">Access from a link:</span> If there is a link to the page you are looking for, try accessing the page from that link.</td></li>
12 verbose bad json </ul>
12 verbose bad json <br />
12 verbose bad json
12 verbose bad json <td id=L_default_9><span>If you are still not able to view the requested page, try contacting your administrator or Helpdesk.</span> </td><br />
12 verbose bad json
12 verbose bad json <br />
12 verbose bad json <td id=L_default_10><span class="bold color1">Technical Information (for support personnel)</span></td><br />
12 verbose bad json <ul>
12 verbose bad json <li><td id=L_default_11><span class="bold">Error Code:</span></td> 407 Proxy Authentication Required. Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. (12209).</li>
12 verbose bad json <li><td id=L_default_12><span class="bold">IP Address:</span></td> 185.31.17.162</li>
12 verbose bad json <li><td id=L_default_13><span class="bold">Date:</span></td> 2014/03/11 01:32:47 PM [GMT]</li>
12 verbose bad json <li><td id=L_default_14><span class="bold">Server:</span></td> OBTMG01.(MyCompany).local </li>
12 verbose bad json <li><td id=L_default_15><span class="bold">Source:</span></td> proxy  </li>
12 verbose bad json </ul>
12 verbose bad json     </div>
12 verbose bad json </div>
12 verbose bad json </body>
12 verbose bad json </html>
13 error registry error parsing json
14 error SyntaxError: Unexpected token
14 error <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
14 error <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
14 error <head>
14 error
14 error <title>Error Message</title>
14 error <meta http-equiv="content-type" content="text/html; charset=utf-8" />
14 error
14 error <style>
14 error body {
14 error
14 error    background:#e5eaf5 url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/bg.gif) top left repeat-x ;
14 error    margin:0px 0px 0px 0px;
14 error    font-family:Arial, Helvetica, sans-serif;
14 error    min-width:1000px;
14 error    font-size:12px;
14 error    color:#000000;
14 error    direction:ltr;
14 error    }
14 error img {border:none}
14 error
14 error
14 error    .main {
14 error        width:100%;
14 error        background:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/topright.gif) top right no-repeat;
14 error        min-width:1000px;
14 error        min-height:400px;
14 error        margin-left:auto;
14 error        margin-right:auto;
14 error        text-align:left;
14 error    }
14 error
14 error    .logo {float:left;  height:103px; }
14 error    .sidetext {float:right; width:182px; height:52px; background:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/sidetext.png) top left; border:1px solid #2a2e31; margin-right:20px; margin-top:20px; padding:4px; }
14 error    .sidetextNone {visibility:hidden; }
14 error
14 error    .whiteline {float:left; clear:both; font-size:20px; margin-left:47px; margin-top:17px; color:#ffffff; white-space:nowrap; }
14 error    .bold {font-weight:bold;}
14 error
14 error    .maintext {float:left; margin-top:20px; clear:both; color:#000; margin-left:47px;}
14 error
14 error    .color1 {color:#677183;}
14 error
14 error    ul {margin-top:0; padding-left:15px; padding-top:5px; padding-bottom:5px;}
14 error
14 error    ul li {list-style-image:url(/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/bullet.gif)}
14 error    A {
14 error     FONT-WEIGHT: bold; COLOR: #005a80;
14 error }
14 error A:hover {
14 error     FONT-WEIGHT: bold;COLOR: #0d3372;
14 error }
14 error </style>
14 error
14 error </head>
14 error <body>
14 error    <div class="main">
14 error         <div class="logo"><img src="/Wbo-BC742A09-E6FA-4945-A21A-856A1F5CED22/logo.png" alt="ForeFront" /></div>
14 error         <div class="whiteline"><td id=L_default_2><span class="bold">Network Access Message:</span> The page cannot be displayed </td></div>
14 error     <div class="maintext">
14 error     <td id=L_default_3><span class="bold color1">Explanation:</span> There is a problem with the page you are trying to reach and it cannot be displayed. </td><br />
14 error <br />
14 error
14 error <td id=L_default_5><span class="bold color1">Try the following:</span></td><br />
14 error
14 error <ul>
14 error <li><td id=L_default_6><span class="bold">Refresh page:</span> Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion.</td></li>
14 error <li><td id=L_default_7><span class="bold">Check spelling:</span> Check that you typed the Web page address correctly. The address may have been mistyped.</td></li>
14 error <li><td id=L_default_8><span class="bold">Access from a link:</span> If there is a link to the page you are looking for, try accessing the page from that link.</td></li>
14 error </ul>
14 error <br />
14 error
14 error <td id=L_default_9><span>If you are still not able to view the requested page, try contacting your administrator or Helpdesk.</span> </td><br />
14 error
14 error <br />
14 error <td id=L_default_10><span class="bold color1">Technical Information (for support personnel)</span></td><br />
14 error <ul>
14 error <li><td id=L_default_11><span class="bold">Error Code:</span></td> 407 Proxy Authentication Required. Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. (12209).</li>
14 error <li><td id=L_default_12><span class="bold">IP Address:</span></td> 185.31.17.162</li>
14 error <li><td id=L_default_13><span class="bold">Date:</span></td> 2014/03/11 01:32:47 PM [GMT]</li>
14 error <li><td id=L_default_14><span class="bold">Server:</span></td> OBTMG01.(MyCompany).local </li>
14 error <li><td id=L_default_15><span class="bold">Source:</span></td> proxy  </li>
14 error </ul>
14 error     </div>
14 error </div>
14 error </body>
14 error </html>
14 error
14 error     at Object.parse (native)
14 error     at RegClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:203:23)
14 error     at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:123:22)
14 error     at Request.EventEmitter.emit (events.js:98:17)
14 error     at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:893:14)
14 error     at Request.EventEmitter.emit (events.js:117:20)
14 error     at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:844:12)
14 error     at IncomingMessage.EventEmitter.emit (events.js:117:20)
14 error     at _stream_readable.js:920:16
14 error     at process._tickCallback (node.js:415:13)
15 error If you need help, you may report this *entire* log,
15 error including the npm and node versions, at:
15 error     <http://github.com/npm/npm/issues>
16 error System Windows_NT 6.1.7601
17 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "search"
18 error cwd C:\Users\(MyUsername)
19 error node -v v0.10.26
20 error npm -v 1.4.3
21 error type unexpected_token
22 verbose exit [ 1, true ]
山姆·迈克(Sam Mikes)

看来您仍然没有通过代理。

407需要代理身份验证。Forefront TMG需要授权才能满足此要求。拒绝访问Web代理过滤器。(12209)

如果您的代理身份验证使用摘要方法,则可能需要设置类似cntlm的内容

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

代理返回HTML后的NPM

来自分类Dev

从url返回HTML的HtmlHelper(基本代理)

来自分类Dev

配置 npm 安装代理

来自分类Dev

十六进制值解码后,PYSNMP代理返回换行符作为输出

来自分类Dev

后增量代理怪异

来自分类Dev

从代理返回异常

来自分类Dev

npm安装后如何在html中使用jQuery?

来自分类Dev

Docker:在代理后面安装npm

来自分类Dev

如何删除/重置NPM代理

来自分类Dev

删除代理后无法更新

来自分类Dev

更新后连接(代理?)超时

来自分类Dev

HTML-处理Web表单后如何返回特定的Arcicle

来自分类Dev

app.all(*)即使在发布请求后也返回entrire html

来自分类Dev

PHP在处理来自angularjs的POST请求后返回html响应

来自分类Dev

Ajax 总是在新的 HTML 内容代码后返回“1”

来自分类Dev

运行python脚本后DJANGO html返回“none”

来自分类Dev

如何强制休眠返回代理

来自分类Dev

HTML页面中的代理

来自分类Dev

在哪里永久设置npm代理?

来自分类Dev

TFS生成代理无法找到npm

来自分类Dev

如何从npm代理中排除某些域

来自分类Dev

npm-yeoman中的代理设置

来自分类Dev

在自托管的VSO代理上运行NPM

来自分类Dev

npm-yeoman中的代理设置

来自分类Dev

安装npm时出现错误代理

来自分类Dev

NPM install --global 命令代理问题

来自分类Dev

多处理代理:让获取者自己返回代理

来自分类Dev

安装create-react-app my-first-react-app后,npm start脚本立即返回错误

来自分类Dev

在代理后使用Maven和SSL的问题