Fomantic-ui: [Table] Unable to build table in the latest versions

Created on 21 Aug 2019  路  5Comments  路  Source: fomantic/Fomantic-UI

Bug Report

Fomantic ui is unable to build from a fresh npm install

Steps to reproduce

  1. npm init a new directory
  2. npm i -D gulp fomantic-ui
  3. Follow all of the installation defaults
  4. npx gulp build --gulpfile semantic/gulpfile.js --cwd semantic/

Expected result

Successful build

Actual result

A build that succeeds until it tries to build the table css:

[PluginError: Cannot create property '_index' on string '!important' in file /home/david/src/test/semantic/src/themes/default/collections/table.variables line no. 1] {
  message: "Cannot create property '_index' on string '!important' in file /home/david/src/test/semantic/src/themes/default/collections/table.variables line no. 1",
  stack: undefined,
  type: 'Syntax',
  filename: '/home/david/src/test/semantic/src/themes/default/collections/table.variables',
  index: NaN,
  line: 1,
  column: -1,
  callLine: NaN,
  callExtract: undefined,
  extract: [
    undefined,
    '/*******************************',
    '             Table'
  ],
  lineNumber: 1,
  fileName: '/home/david/src/test/semantic/src/themes/default/collections/table.variables',
  name: 'Error',
  plugin: 'gulp-less',
  showProperties: true,
  showStack: false,
  __safety: { toString: [Function: bound ] }
}

Version

node 12.8.0 (also tested 10.16.2; same error)
npm 6.10.2
fomantic-ui 2.7.7
gulp 4.0.2


EDIT: looks like someone else is encountering a similar error, it may be because the table.variables is the only file with !important https://stackoverflow.com/questions/57568988/gulp-less-fails-when-using-important

typbug typupstream

Most helpful comment

Fixed by less 3.10.3 in #950

All 5 comments

~This issue is resolved if i npm install -D gulp-less@3. Not sure if this is ideal, but worth noting.~

The above is only true in the base semantic repository. There are other dependency issues afoot.

Looks like it's precisely what's happening here https://github.com/fomantic/Fomantic-UI/pull/939
npm i -D less@~3.9.0 fixes it

It seems that upstream issue in less.js.
Ref: https://github.com/less/less.js/issues/3423

Fixed by less 3.10.3 in #950

This issue is fixed in fresh installs, so I'll to go ahead and close it

Was this page helpful?
0 / 5 - 0 ratings