2017-06-28 2 views
0

Nous avons configuré un npm avec saas artificier jfrog. Le npm possède à la fois npm-local et npm-remote repository.npm installation ne fonctionne pas avec le compte saas artificiel de jfrog

Le référentiel npm-remote pointe vers https://registry.npmjs.org avec les paramètres par défaut.

J'ai la ~/.npmrc comme suit (en suivant les instructions de Artifactory)

_auth="[auth]" 
email=[email address] 
always-auth=true 
registry=https://[company-name].jfrog.io/centricsoftware/api/npm/npm/ 

j'étais même en mesure de publier un module NPM au serveur Artifactory de JFrog.

Le problème que j'ai avec installer des modules NPM via JFrog Artifactory

$>npm install express 
npm ERR! code E401 
npm ERR! 401 Unauthorized: [email protected]^4.15.3 

npm ERR! A complete log of this run can be found in: 
npm ERR!  /Users/[user]/.npm/_logs/2017-06-28T12_14_24_852Z-debug.log 

Le contenu du fichier journal sont comme suit

0 info it worked if it ends with ok 
1 verbose cli [ '/usr/local/bin/node', 
1 verbose cli '/usr/local/bin/npm', 
1 verbose cli 'install', 
1 verbose cli 'express' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose npm-session 91f67a25a5bc9570 
5 silly install loadCurrentTree 
6 silly install readLocalPackageData 
7 http fetch GET 401 https://centricsoftware.jfrog.io/centricsoftware/api/npm/npm/express 6360ms 
8 silly fetchPackageMetaData error for [email protected]^4.15.3 401 Unauthorized: [email protected]^4.15.3 
9 verbose stack Error: 401 Unauthorized: [email protected]^4.15.3 
9 verbose stack  at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19) 
9 verbose stack  at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 
9 verbose stack  at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31) 
9 verbose stack  at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18) 
9 verbose stack  at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10) 
9 verbose stack  at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18) 
9 verbose stack  at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16) 
9 verbose stack  at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10) 
9 verbose stack  at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14) 
9 verbose stack  at runCallback (timers.js:800:20) 
9 verbose stack  at tryOnImmediate (timers.js:762:5) 
9 verbose stack  at processImmediate [as _immediateCallback] (timers.js:733:5) 
10 verbose cwd /Users/rohitghatol/tmp/try 
11 verbose Darwin 16.6.0 
12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express" 
13 verbose node v8.1.2 
14 verbose npm v5.0.4 
15 error code E401 
16 error 401 Unauthorized: [email protected]^4.15.3 
17 verbose exit [ 1, true ] 

Que vais-je pas ici?

Vive Rohit

Répondre

2

Le problème est lié à ce NPM issue qui a été introduit avec la version 5.0 NPM.
Une solution à ce problème sera déployée dans SaaS Artifactory dans les prochains jours.
En outre, l'équipe de npm travaille également sur une solution du côté client.