Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72326

Component library does not initialise on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Other
    • Labels:
    • Environment:
      Windows 10 cmd
    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Testing Instructions:
      Hide

      This test should be run on the following OSes:

      1. Linux
      2. Windows
      3. MacOS

      It also assumes that you have successfully installed grunt

      1. From the command line run grunt componentlibrary
      2. Verify that the task completes successfully with no error messages

      Success will look similar to:

      Running "componentlibrary:docsBuild" task
      Building sites …
                         | EN
      +------------------+----+
        Pages            | 95
        Paginator pages  |  0
        Non-page files   | 14
        Static files     | 14
        Processed images |  0
        Aliases          |  6
        Sitemaps         |  1
        Cleaned          |  0
       
      Total in 598 ms
      Running "componentlibrary:cssBuild" task
      Rendering Complete, saving .css file...
      Wrote CSS to D:\moodlesource\moodledev2\admin\tool\componentlibrary\hugo\dist\css\docs.css
      Wrote Source Map to D:\moodlesource\moodledev2\admin\tool\componentlibrary\hugo\dist\css\docs.css.map
      Running "componentlibrary:indexBuild" task
       
      Done.
      

      Show
      This test should be run on the following OSes: Linux Windows MacOS It also assumes that you have successfully installed grunt From the command line run grunt componentlibrary Verify that the task completes successfully with no error messages Success will look similar to: Running "componentlibrary:docsBuild" task Building sites … | EN +------------------+----+ Pages | 95 Paginator pages | 0 Non-page files | 14 Static files | 14 Processed images | 0 Aliases | 6 Sitemaps | 1 Cleaned | 0   Total in 598 ms Running "componentlibrary:cssBuild" task Rendering Complete, saving .css file... Wrote CSS to D:\moodlesource\moodledev2\admin\tool\componentlibrary\hugo\dist\css\docs.css Wrote Source Map to D:\moodlesource\moodledev2\admin\tool\componentlibrary\hugo\dist\css\docs.css.map Running "componentlibrary:indexBuild" task   Done.

      Description

      When trying to setup the component library on Windows the grunt command fails with:

      D:\moodlesource\moodledev2>grunt componentlibrary
      Running "componentlibrary:docsBuild" task
      D:\moodlesource\moodledev2\node_modules\.bin\hugo:2
      basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
                ^^^^^^^
       
      SyntaxError: missing ) after argument list
          at wrapSafe (internal/modules/cjs/loader.js:979:16)
          at Module._compile (internal/modules/cjs/loader.js:1027:27)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
          at Module.load (internal/modules/cjs/loader.js:928:32)
          at Function.Module._load (internal/modules/cjs/loader.js:769:14)
          at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
          at internal/main/run_main_module.js:17:47
      

        Attachments

        1. hugo-files-on-windows.png
          hugo-files-on-windows.png
          3 kB
        2. windows.png
          windows.png
          36 kB
        3. working_cmd.png
          working_cmd.png
          171 kB
        4. working_gitbash.png
          working_gitbash.png
          232 kB
        5. working_mac.png
          working_mac.png
          128 kB
        6. working_ps.png
          working_ps.png
          134 kB

          Issue Links

            Activity

              People

              Assignee:
              nmagill Neill Magill
              Reporter:
              nmagill Neill Magill
              Peer reviewer:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Jun Pataleta Jun Pataleta
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m