When the !important declaration is used on a specific less variable, it causes the build to fail. The use of !important is common in our codebase, so it's puzzling why this particular instance is causing an issue.
Setup:
customer1.less
@import "basefile";
@wrapper-height: auto !important;
...
basefile.less
@import 'variables/basefile-variables';
...
basefile-variables.less
@wrapper-height: auto;
...
Error encountered during gulp-less compilation:
Error in plugin "gulp-less"
Message:
Cannot create property '_index' on string '!important' in file /<redacted>/customer1.less line no. 1
Details:
type: Syntax
filename: /<redacted>/customer1.less
index: NaN
line: 1
column: -1
callLine: NaN
callExtract: undefined
extract: ,@import "basefile";,
lineNumber: 1
fileName: /<redacted>/customer1.less