fynpo icon indicating copy to clipboard operation
fynpo copied to clipboard

Private npm registry support

Open tuan231195 opened this issue 2 years ago • 4 comments

Thank you for this great tool. I am just wondering if it has private npm registry support?

I am getting this command when using a private npm registry:

 Error: Unable to authenticate, need: Bearer realm="<redacted>/<redacted>-npm", Basic realm="<redacted>/<redacted>-npm"

However, I have .npmrc file set up at the root of the repo

@<redacted>:registry=https://<redacted>.d.codeartifact.eu-central-1.amazonaws.com/npm/<redacted>-npm/
//<redacted>.d.codeartifact.eu-central-1.amazonaws.com/npm/<redacted>-npm/:always-auth=true
//<redacted>.d.codeartifact.eu-central-1.amazonaws.com/npm/<redacted>-npm/:_authToken=${CODEARTIFACT_AUTH_TOKEN}
registry=https://registry.npmjs.org

I am using

fyn install -q d --npm-lock --sl --rcfile

Error logs

AggregateError: Unable to retrieve meta for package @<redacted>/<redacted>-graphql-client - If you've updated its version recently, try to run fyn with '--refresh-meta' again
    at tryCatcher (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:24620:19)
    at Promise._settlePromiseFromHandler (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22359:29)
    at Promise._settlePromise (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22423:14)
    at Promise._settlePromise0 (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22473:10)
    at Promise._settlePromises (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22563:14)
    at _drainQueueStep (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18662:8)
    at _drainQueue (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18654:5)
    at Async._drainQueues (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18671:3)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18578:10)
  AggregateError: pacote failed fetching packument of @<redacted>/<redacted>-graphql-client
      at tryCatcher (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:24620:19)
      at Promise._settlePromiseFromHandler (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22359:29)
      at Promise._settlePromise (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22423:14)
      at Promise._settlePromise0 (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22473:10)
      at Promise._settlePromises (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:22563:14)
      at _drainQueueStep (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18662:8)
      at _drainQueue (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18654:5)
      at Async._drainQueues (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18671:3)
      at Immediate.Async.drainQueues [as _onImmediate] (/Users/tuannguyen/.nvm/versions/node/v14.19.0/lib/node_modules/fyn/dist/fyn.js:18578:10)
    Error: Unable to authenticate, need: Bearer realm="<redacted>/<redacted>-npm", Basic realm="<redacted>/<redacted>-npm"

tuan231195 avatar Apr 08 '22 23:04 tuan231195

I think there are 2 issues here

  • env variable in .npmrc not being substituted
  • versions of pacote and npm-registry-fetch are too old

tuan231195 avatar Apr 09 '22 00:04 tuan231195

version 1.1.33 now handle env substitute. please see if that fixes issue, else need to update pacote etc.

jchip avatar Apr 09 '22 01:04 jchip

@tuan231195 did it resolve the issue?

jchip avatar Apr 12 '22 15:04 jchip

@jchip Still doesn't work for me. I get the same error

bm77525-kr avatar Sep 06 '22 17:09 bm77525-kr