Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-14805

The npm repo's package.json file's version field are not being correctly parsed if they have v in front of it


    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 5.2.1, 5.4.6
    • Fix Version/s: 6.2.0
    • Component/s: NPM
    • Labels:
    • Sprint:
      Leap 33, Leap 34



      Per npmjs semver spec, A leading "=" or "v" character is stripped off and ignored.

      A leading = should be hanled as well.



      The NPM package.json file is not being correctly parsed when there is a V(v5.0.14) in the version field of the package.json file. The npm install command fails returning a 404 even when there is a valid package exisiting in the NPM repo of artifactory.

      Below are the steps to recreate the issue,

      1) Create a REMOTE NPM repo in Artifactory.
      Call it npmjs
      2) Create a LOCAL repo in Artifactory
      Call it npmjs-approved
      3) Modify the ~/.npmrc file to contain:
      4) Create a folder ‘jfrog’ & create the package.json file to contain:

      "name": "project-template",

      "version": "1.0.0-SNAPSHOT",

      "description": "Project template",

      "private": true,


      { "node": ">= 5.8.0" }


      "author": "JFROG, Inc.",


      { "highcharts" : "5.0.14" }


      "devDependencies" : {


      "peerDependencies" : {



      5) Now pull down the artifact ‘highcharts’ by running the command ‘npm install’

      6) Please check that you have the highcharts 5.0.14 artifact in your node_modules directory

      7) Please check that you have the highcharts artifact in your npmjs-cache in Artifactory

      8) In Artifactory, right click on the npmjs-cache and choose copy contents and choose the target repo to be npmjs-approved

      9) In Artifactory, right click on the npmjs-cache and choose delete contents

      10) Change your ~/.npmrc file to contain:

      11) Delete any cached artifacts:
      rm -rf ./node_modules (In the Jfrog Directory)
      npm cache clean
      12) Now try ‘npm install’ again

      If you point the browser to the exact same location where the Artifactory throws 404 and add v in front of the version within the url, the package.json file is present




            • Assignee:
              lizad Liza Dashevski (Inactive)
              manojt Manoj Tuguru
              Assigned QA:
              Konstantin Shenderov (Inactive)
            • Votes:
              0 Vote for this issue
              5 Start watching this issue


              • Created: