Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private npm registry support #28

Open
tuan231195 opened this issue Apr 8, 2022 · 4 comments
Open

Private npm registry support #28

tuan231195 opened this issue Apr 8, 2022 · 4 comments

Comments

@tuan231195
Copy link

tuan231195 commented Apr 8, 2022

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
Copy link
Author

I think there are 2 issues here

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

@jchip
Copy link
Member

jchip commented Apr 9, 2022

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

@jchip
Copy link
Member

jchip commented Apr 12, 2022

@tuan231195 did it resolve the issue?

@bm77525-kr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants