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

Node not able to compile r.js in 11

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.0.4
    • Fix Version/s: 11.0.4
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Rank:
      1|hzr38n:
    • Sprint:
      AM Sustaining Sprint 19

      Description

      I get this error when compiling 11.

      INFO] Running with Node @ node
      /Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:2256
              if (path.existsSync(url)) {
                       ^
      
      TypeError: path.existsSync is not a function
          at Function.req.load (/Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:2256:18)
          at resume (/Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:1280:37)
          at Object.context.require (/Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:1479:25)
          at requirejs (/Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:1681:24)
          at /Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:9770:1
          at Object.<anonymous> (/Users/qcastel/Development/GIT/openam-sustaining/openam-authentication/deviceprint/scripts/src/main/requirejs/r.js:9820:2)
          at Module._compile (module.js:434:26)
          at Object.Module._extensions..js (module.js:452:10)
          at Module.load (module.js:355:32)
          at Function.Module._load (module.js:310:12)
      

      A simple fix is to add this

         -     if (path.existsSync(url)) {
         +     if (fs.existsSync ? fs.existsSync(url) : path.existsSync(url)) {
      

      This solution is part of the OPENAM-5508 fix, so 12.0.1 contains the same change.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.castel Quentin CASTEL [X] (Inactive)
                Reporter:
                quentin.castel Quentin CASTEL [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.25h
                  0.25h
                  Remaining:
                  Remaining Estimate - 0.25h
                  0.25h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified