目前,我一直在设置Nexus 3.2,尤其是NPM存储库。我有一个代理存储库,指向registry.npmjs.org我已成功发布到同一实例上的托管存储库,以及使用实例通过组存储库下载工件npm update -g。
不幸的是,通过该小组下载范围内的项目无法正常工作,这对于进行Angular 2开发至关重要。当我尝试时,出现404错误:
brian$ npm install "@angular/common"
npm ERR! registry error parsing json
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
npm ERR! <html><head>
npm ERR! <title>404 Not Found</title>
npm ERR! </head><body>
npm ERR! <h1>Not Found</h1>
npm ERR! <p>The requested URL /nexus/repository/npm_group/@angular/common was not found on this server.</p>
npm ERR! </body></html>
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/brian/.npm/_logs/2017-03-28T07_38_37_824Z-debug.log
Run Code Online (Sandbox Code Playgroud)
范围是3.x的高度吹捧的功能,我很高兴它们可以正常工作。因为我可以发布到受保护的存储库,并且代理存储库中充满了非范围内的依赖项,所以我认为我已经非常接近了。我该如何调试?
FWIW,我在Apache HTTPd服务器后面有Nexus:
ProxyPass /nexus http://dev.example.com:8081/nexus nocanon
ProxyPassReverse /nexus http://dev.example.com:8081/nexus
AllowEncodedSlashes On
<Location /nexus>
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</Location>
Run Code Online (Sandbox Code Playgroud)
谢谢!
| 归档时间: |
|
| 查看次数: |
1416 次 |
| 最近记录: |