Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-85987

Fix NPM Invalid version error for the npmRunBuild task

    Details

      Description

      Patcher needs to add a qualifier to the version (.hotfix-xxx-xxx). This causes the npmRunBuild task to fail on Jenkins with the error: npm ERR! Invalid version.

      This fix makes it valid temporarily" (e.g. swap the periods and dashes: change .hotfix-123-7010 to -hotfix.123.7010 then changing it back after the task completes)

      gw :apps:dynamic-data-mapping:dynamic-data-mapping-form-renderer:npmRunBuild
      
      :apps:dynamic-data-mapping:dynamic-data-mapping-form-renderer:npmRunBuild
      npm ERR! Invalid version: "3.0.7.hotfix-123-7010"
      > Building 80% > :apps:dynamic-data-mapping:dynamic-data-mapping-form-renderer:npmRunBuild
      npm ERR! A complete log of this run can be found in:
      npm ERR!     C:\Users\pcshin\AppData\Roaming\npm-cache\_logs\2018-10-03T20_14_26_130Z-debug.log
      :apps:dynamic-data-mapping:dynamic-data-mapping-form-renderer:npmRunBuild FAILED
      
      FAILURE: Build failed with an exception.
      

      Note: To trigger the npmRunBuild to change the hotfix qualifiers from .hotfix to -hotfix and back after compiling finishes, you'll need to add a JENKINS_HOME environment variable with any kind of value since this code is meant to be ran in a Jenkins environment. The npmRunBuild task usually runs during the gradle "jar" task.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                peter.shin Peter Shin
                Recent user:
                Lester Pi
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  Master