Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-10317

OpenAM 13.5.x openam-ui-ria does not build on Windows and Linux


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.5.0
    • Fix Version/s: 13.5.1
    • Component/s: build
    • Labels:
    • Environment:
      Fails on Windows and Linux. Works on Mac
      Java 7 or 8
      OpenAM 13.5.x/OpenAM 13.5.0 (-DskipTests=true)

    • Sprint:
      AM Sustaining Sprint 33
    • Story Points:
    • Support Ticket IDs:


      For the OpenAM 13.5.0 or 13.5.x, openam-ui-ria fails to build on Linux and Windows due to a NPM dependencies for fsevents (that only exists on Mac).


      [INFO] ------------------------------------------------------------------------
      [INFO] Building OpenAM RIA Web UI 13.5.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [WARNING] The POM for org.forgerock.commons.ui.libs:form2js:js:2.0-769718a is missing, no dependency information available^M
      [WARNING] The POM for org.forgerock.commons.ui.libs:font-awesome:zip:4.5.0 is missing, no dependency information available^M
      [ERROR] gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
      [ERROR] gyp ERR! System Linux 3.10.0-327.22.2.el7.x86_64
      [ERROR] gyp ERR! command "/work/openam/openam-ui/openam-ui-ria/node/node" "/work/openam/openam-ui/openam-ui-ria/node/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/work/openam/openam-ui/openam-ui-ria/node_modules/fsevents/lib/binding/Release/node-v46-linux-x64/fse.node" "--module_name=fse" "--module_path=/work/openam/openam-ui/openam-ui-ria/node_modules/fsevents/lib/binding/Release/node-v46-linux-x64"
      [ERROR] gyp ERR! cwd /work/openam/openam-ui/openam-ui-ria/node_modules/fsevents
      [ERROR] gyp ERR! node -v v4.4.5
      [ERROR] gyp ERR! node-gyp -v v3.3.1
      [ERROR] gyp ERR! not ok
      [ERROR] node-pre-gyp ERR! build error
      [ERROR] node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/work/openam/openam-ui/openam-ui-ria/node_modules/fsevents/lib/binding/Release/node-v46-linux-x64/fse.node --module_name=fse --module_path=/work/openam/openam-ui/openam-ui-ria/node_modules/fsevents/lib/binding/Release/node-v46-linux-x64' (1)
      [ERROR] node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/work/openam-sustaining/openam-ui/openam-ui-ria/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

      It seems that npm-shrinkwrap.json in openam-ui/openam-ui-ria has defined fsevents which exists on Mac and on a built machine w/o NPM/Node and clean build system on Windows and Linux, the npm install fails as above. Making this optional on openam-ui/openam-ui-ria/package.json and this problem above go away.

      --- a/openam-ui/openam-ui-ria/package.json
      +++ b/openam-ui/openam-ui-ria/package.json
      @@ -14,6 +14,9 @@
           "deps": "ncu -u && mvn clean install",
           "postdeps": "npm shrinkwrap --dev"
      +  "optionalDependencies": {
      +    "fsevents": "*"
      +  },
         "devDependencies": {
           "babel-eslint": "6.0.4",
           "babel-plugin-transform-es2015-modules-amd": "6.8.0",

      Build Retry note
      When compilation fails due to this and if say if one were to somehow fix the above, one may want to delete openam-ui/openam-ui-ria/node and openam-ui/openam-ui-ria/node-modules to make sure old residual node is not that to cause issues like phantomjs not found or timeout).

      Other (14.0?)
      On OpenAM Master recently the npm-shrinkwrap.json does not define any more module (basically empty) and hence this may also be fixed that way. This may need to be evaluated which best way to avoid this. (since it is unknown if this issue may crop up again - but putting the optional dependencies on package.json may avoid all this without needing to consider if later this issue reoccurs)




            • Assignee:
              markdr Mark de Reeper
              chee-weng.chea C-Weng C
            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created: