1

現在、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

スコープは 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>

ありがとう!

4

1 に答える 1