Search code examples
gulpsemantic-uigulp-watch

Semantic UI gulp rtl watch error


I installed semantic ui, created a custom theme, but when I use gulp watch, the RTL watch.js loads and on every change I get the following error:

Watching source files for changes
Change detected in packaged theme
/home/vagrant/Code/angular/semantic/tasks/rtl/watch.js:109
        lessPath = lessPath.replace(tasks.regExp.theme, source.definitions);
                           ^

TypeError: Cannot read property 'replace' of undefined
    at /home/vagrant/Code/angular/semantic/tasks/rtl/watch.js:109:28

which has to do with these lines:

else if(isPackagedTheme) {
    console.log('Change detected in packaged theme');
    lessPath = lessPath.replace(tasks.regExp.theme, source.definitions);
    lessPath = util.replaceExtension(file.path, '.less');
  }

I didn't change any line in the gulp files. What am I doing wrong?


Solution

  • There's a bug in the gulpfiles afaik. I've created a Pull Request on Github:

    https://github.com/Semantic-Org/Semantic-UI/pull/3586