electrode-io / fynpo

🛠️📦 a node.js monorepo manager
https://www.electrode.io/fynpo
Apache License 2.0
56 stars 11 forks source link

Private npm registry support #28

Open tuan231195 opened 2 years ago

tuan231195 commented 2 years ago

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 commented 2 years ago

I think there are 2 issues here

jchip commented 2 years ago

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

jchip commented 2 years ago

@tuan231195 did it resolve the issue?

bm77525-kr commented 2 years ago

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