Uploaded image for project: 'Opencast'
  1. MH-12981

Admin-UI Local Develop: grunt serve is not finding main.css

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed and reviewed
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Engage User Interface
    • Labels:
      None
    • Severity:
      Tests
    • Steps to reproduce:
      Hide
      Steps to reproduce:
      Run the following from a local cloned Opencast repo
      1. checkout r/5.x
      2. cd modules/admin-ui
      3. rm -rf node_modules
      4. rm -rf .tmp
      5. rm -rf target
      6. npm install
      7. grunt build
      8. grunt serve
       
       Actual Results: A gigantic US flag and many other giant flag images, un styled view of the admin-ui because the GET main.css got 404
       
        Expected Results: the main.css is found and the page has nice styling.
       
        Workaround (if any): Change the Gruntfile.js staging path back to .tmp from target/grunt/.tmp and grunt build.
       
      +++ b/modules/admin-ui/Gruntfile.js
      @@ -24,7 +24,7 @@ module.exports = function (grunt) {
         var appConfig = {
           app: require('./bower.json').appPath,
           dist: 'target/grunt/webapp',
      - staging: 'target/grunt/.tmp'
      + staging: '.tmp'
         };

      The issue appears to be that supporting underlying node libraries related to the grunt server and watch are either expecting the css to be in the .tmp, or are falling back to looking for it in the .tmp off the base dir. Changing the options.staging is not enough to avoid this.

      I verified that .tmp/main.css off the base dir is being live updated and served when a core src scss files is modified. Doing a few more sanity checks before submitting a pull.


      Show
      Steps to reproduce: Run the following from a local cloned Opencast repo 1. checkout r/5.x 2. cd modules/admin-ui 3. rm -rf node_modules 4. rm -rf .tmp 5. rm -rf target 6. npm install 7. grunt build 8. grunt serve    Actual Results: A gigantic US flag and many other giant flag images, un styled view of the admin-ui because the GET main.css got 404     Expected Results: the main.css is found and the page has nice styling.     Workaround (if any): Change the Gruntfile.js staging path back to .tmp from target/grunt/.tmp and grunt build.   +++ b/modules/admin-ui/Gruntfile.js @@ -24,7 +24,7 @@ module.exports = function (grunt) {    var appConfig = {      app: require('./bower.json').appPath,      dist: 'target/grunt/webapp', - staging: 'target/grunt/.tmp' + staging: '.tmp'    }; The issue appears to be that supporting underlying node libraries related to the grunt server and watch are either expecting the css to be in the .tmp, or are falling back to looking for it in the .tmp off the base dir. Changing the options.staging is not enough to avoid this. I verified that .tmp/main.css off the base dir is being live updated and served when a core src scss files is modified. Doing a few more sanity checks before submitting a pull.

      TestRail: Results

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              karen_dolan Karen Dolan
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                TestRail: Cases