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

NPM install fails if the same package with different checksums presents in local and remote repositories


    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.7.4
    • Fix Version/s: 5.10.0
    • Component/s: NPM
    • Labels:


      NPM install fails if the same package with different checksums presents in local and remote repositories. For example if you have a package within local and remote repositories (same version) but different checksums, the npm install will fail upon verifying the checksum:

      1. Cache an npm package (for example function-signature).
      2. Download the tgz file and modify the package.json file (keep the version the same).
      3. Compress the file again, deploy to local repository.
      4. Run npm install against a local repository --> All works.
      5. Run npm cache clean
      6. Change your .npmrc file to point to virtual repository.
      7. Run npm i function-signature --> Will fail upon verifying checksum:

      Alexeis-MBP:npm alexeiv$ npm i function-signature
      npm ERR! Darwin 15.2.0
      npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "function-signature"
      npm ERR! node v4.4.2
      npm ERR! npm  v3.8.6
      npm ERR! shasum check failed for /var/folders/rg/fnch7p3s1vsgx9qn6vjbrzz80000gn/T/npm-32988-1c5a058c/localhost_9090/artifactory/api/npm/npm-virtual/function-signature/-/function-signature-0.2.4.tgz
      npm ERR! Expected: fb3900f5a11288ccc208318b050bc0998177636a
      npm ERR! Actual:   097b6aff00d0bcdcffe6f327c27cce4cd5b69f99
      npm ERR! From:     http://localhost:9090/artifactory/api/npm/npm-virtual/function-signature/-/function-signature-0.2.4.tgz
      npm ERR! 
      npm ERR! If you need help, you may report this error at:
      npm ERR!     <https://github.com/npm/npm/issues>
      npm ERR! Please include the following file with any support request:
      npm ERR!     /Users/alexeiv/Documents/temp/npm/npm-debug.log

      The same will happen if you specify a the version: npm i function-signature@0.2.4

      As a workaround, you can deploy the package to local repository with different version.




            • Assignee:
              yoazm Yoaz Menda (Inactive)
              alexeiv Alexei Vainshtein
              Assigned QA:
              Gilad Kalchheim (Inactive)
            • Votes:
              8 Vote for this issue
              14 Start watching this issue


              • Created: