Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-26856

[NPM] npm ERR! code ENOVERSIONS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Automatically Closed
    • Affects Version/s: 3.29.2
    • Fix Version/s: None
    • Component/s: NPM
    • Labels:
      None

      Description

      Description
      We encounter random issues (ENOVERSION - No valid versions available for undefined) when we download npm dependencies from our Nexus instance.
      Nexus is configured as a proxy of https://registry.npmjs.org
      We are using Nexus 3.29.2, the blob-store is on S3 and we reproduced this problem on our staging environment.

      What we tried with no effect

      1. Upgrade Node/NPM and clear any client cache with no effect ( npm cache clear --force )
      2. Repair - Reconcile component database from blob store
      3. Invalidating the cache seems to work but the problem came back after few days

      Server Logs
      It seems this Nexus log message is linked with the problem as it appears each time we have the error :

      2021-03-01 14:21:11,470+0000 INFO  [qtp2010808790-252] *UNKNOWN org.sonatype.nexus.repository.npm.internal.orient.OrientNpmGroupDataFacet - Missing blob npm-accor-group@18DCC74A-1F3A2816-3C04EE8F-BF28FF3B-0217D907:aa2258a1-1a1f-4db1-9347-dc7999dc2def containing cached metadata bn.js, deleting asset and triggering rebuild.
      2021-03-01 14:21:11,516+0000 WARN  [qtp2010808790-252] *UNKNOWN org.sonatype.nexus.repository.npm.internal.orient.OrientNpmProxyFacet - Unable to find blob npm-accor-registry@18DCC74A-1F3A2816-3C04EE8F-BF28FF3B-0217D907:0f795eeb-07e2-4805-b00f-690d394c8f2d for bn.js, will check remote
      2021-03-01 14:21:11,858+0000 WARN  [qtp2010808790-252] *UNKNOWN org.sonatype.nexus.repository.npm.internal.orient.OrientNpmProxyFacet - Unable to find blob npm-accor-registry@18DCC74A-1F3A2816-3C04EE8F-BF28FF3B-0217D907:0f795eeb-07e2-4805-b00f-690d394c8f2d for bn.js, skipping merge of package root
      2021-03-01 14:21:12,145+0000 WARN  [qtp2010808790-252] *UNKNOWN org.sonatype.nexus.repository.npm.internal.orient.NpmStreamPayload - Missing blob for asset Asset{metadata=AttachedEntityMetadata{schema=asset, document=asset#15:21051{bucket:#13:175,format:npm,last_updated:Mon Mar 01 14:21:12 UTC 2021,attributes:[5],component:null,name:bn.js,size:137073,content_type:application/json,created_by:anonymous,created_by_ip:XX.XXX.XX.XX,blob_ref:npm-accor-group@18DCC74A-1F3A2816-3C04EE8F-BF28FF3B-0217D907:2daa4b5e-c89b-4ff2-85b3-b4336c462227,last_downloaded:Mon Mar 01 12:26:56 UTC 2021,blob_created:Thu Feb 25 14:59:38 UTC 2021,blob_updated:Mon Mar 01 14:21:12 UTC 2021} v5}, name=bn.js} and no handler set to recover, for package 'bn.js' and rev 'bn.js'
      

      Client Logs

      $ node --version
      v10.24.0
      $ npm version
      { npm: '6.14.11',
        ares: '1.15.0',
        brotli: '1.0.7',
        cldr: '35.1',
        http_parser: '2.9.4',
        icu: '64.2',
        modules: '64',
        napi: '7',
        nghttp2: '1.41.0',
        node: '10.24.0',
        openssl: '1.1.1j',
        tz: '2019c',
        unicode: '12.1',
        uv: '1.34.2',
        v8: '6.8.275.32-node.59',
        zlib: '1.2.11' }
      $ npm ci
      npm ERR! code ENOVERSIONS
      npm ERR! No valid versions available for undefined
      
      5688 info teardown Done in 0s
      5689 verbose type version
      5690 verbose stack Error: No valid versions available for undefined
      5690 verbose stack     at pickManifest (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:39:11)
      5690 verbose stack     at fetchPackument.then.packument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:14)
      5690 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
      5690 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
      5690 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)
      5690 verbose stack     at Promise._settlePromiseCtx (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:611:10)
      5690 verbose stack     at _drainQueueStep (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:142:12)
      5690 verbose stack     at _drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
      5690 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
      5690 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
      5690 verbose stack     at runCallback (timers.js:705:18)
      5690 verbose stack     at tryOnImmediate (timers.js:676:5)
      5690 verbose stack     at processImmediate (timers.js:658:5)
      5692 verbose Linux 4.14.214-160.339.amzn2.x86_64
      5693 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--globalconfig" "/root/.npmrc" "ci"
      5694 verbose node v10.24.0
      5695 verbose npm  v6.14.11
      5696 error code ENOVERSIONS
      5697 error No valid versions available for undefined
      

        
      Also experienced by this users : https://community.sonatype.com/t/npm-update-and-install-issues/5860

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ajoux-accor Antoine
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title