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

Component library does not initialise on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0
    • 4.0
    • Other
    • Windows 10 cmd
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • 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.

      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
      

        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

            nmagill Neill Magill
            nmagill Neill Magill
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.