NPM Install not working with artifactory around proxy

后端 未结 3 623
遇见更好的自我
遇见更好的自我 2021-02-19 13:47

So basically I am trying to download packages from https://registry.npmjs.org/ using npm install, but I am under a proxy.

I have set-up a remote repository that will hit

3条回答
  •  迷失自我
    2021-02-19 14:31

    The error message indicated that npm tried looking for a package named 'artifactory' instead of 'bower' :

    'artifactory' is not in the npm registry

    This can happen due to various misconfiguration:

    1. Configuring the Artifactory repository to use a wrong registry URL like https://registry.npmjs.org/artifactory
    2. Configuring npm to use a wrong registry URL: npm config set registry http://myserver:8081/artifactory/api/npm/npmjs-registry/artifactory

    Both cases will cause Artifactory to send requests to the public registry with the following URL: https://registry.npmjs.org/artifactory/bower instead of https://registry.npmjs.org/bower

    In order to make sure your setup is correct, try the following:

    1. Click the "Test" button in the Artifactory "Edit Remote Repository" window to verify that the registry URL is correct and Artifactory can reach it
    2. Verify the registry URL stored in the .npmrc configuration file. For example, you can send a request for getting the 'bower' package info: curl -vv http://myserver:8081/artifactory/api/npm/npm-repo-name/bower

    3. If npm install still fails, look at the npm-debug.log and the Artifactory log files for more info

提交回复
热议问题