2017-03-20 3 views
2

5.1.3으로 업그레이드 한 후 npm 레포는 npm 범위 아티팩트를 다운로드 할 수 없습니다.npm 범위 아티팩트를 다운로드 할 수 없습니다.

와 바람둥이에를 NoDecode

  • AllowEncodedSlashes에

    • AllowEncodedSlashes :

      npm install @angular/core 
      npm ERR! Linux 3.10.0-514.2.2.el7.x86_64 
      npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "@angular/core" 
      npm ERR! node v6.9.1 
      npm ERR! npm v3.10.8 
      npm ERR! code E401 
      
      npm ERR! Registry returned 401 for GET on https://artifactory.mycompany.com/artifactory/api/npm/npmrepo/@angular%2fcore 
      npm ERR! 
      npm ERR! If you need help, you may report this error at: 
      npm ERR!  <https://github.com/npm/npm/issues> 
      
      npm ERR! Please include the following file with any support request: 
      npm ERR!  /root/npm-debug.log 
      

      우리와 artifactory 앞에 아파치 역방향 프록시를

      -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true 
      

      나는 심지어 아파치를 끄고 다운로드를 시도했다. 결과는 동일했다. 바람둥이가 알려지지 않은 무언가 때문에 바람둥이를 해독하는 바람둥이입니다.

      @angular%2fcore 
      
  • +0

    그냥 확인하기 위해, 당신이 당신의 '.npmrc'범위 패키지의 사용을 파일에 정의 // localhost를 : 8081/artifactory/api/npm/npm-virtual/ – Ariel

    +0

    그리고 401을 확인하면서 명령을 실행하는 사용자의 권한을 확인하십시오. 401은 사용자에게 충분한 권한이 없음을 의미합니다. 또한 Artifactory의 request.log를보고 Artifactory에서 해당 요청에 대해 나열된 사용자를 확인해야합니다. – Ariel

    +0

    안녕하세요. 내 .npmrc 파일의 일부입니다. @angular : registry = https : //artifactory.mycompany.com/artifactory/api/npm/npmtestext URL에 % 2f가 있기 때문에 401이 표시됩니다. repo 또는 아티팩트 @ angular % 2fcore가 없습니다. 추신을위한 PS 모든 npm repo에 대한 모든 권한을 가진 계정을 만들었으므로 지금 사용하고 있습니다. – Marek

    답변

    0

    나는 동일한 문제가있었습니다. 내 .npmrc에 다음을 추가하여 그것을 해결 :

    always-auth = false 
    

    그러나 우리의 artifactory 서버는 HTTP입니다. 예를 들어 : @angular : 레지스트리 = HTTP 다음 Artifactory NPM 문서에 작성된

    관련 문제