Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

[Build Tools] Some CSS files are missing after build

Open sylvaindeloux opened this issue 7 years ago • 10 comments

Bug Report

On a new install of Fomantic-UI, the CSS build script does not throw any error, but some CSS files are missing.

Steps to reproduce

  1. npm install --save fomantic-ui (with automatic parameters)
  2. sudo npm install -g [email protected]
  3. cd semantic && gulp build-css

Expected result

The semantic/dist/components folder should contain CSS files for every component.

Actual result

A lot of CSS files are missing (form, dropdown, checkbox...) from the semantic/dist/components. The only present files are (+ minified versions) :

  • button.css
  • container.css
  • divider.css
  • flag.css
  • header.css
  • icon.css
  • image.css
  • input.css
  • label.css
  • list.css
  • loader.css
  • placeholder.css
  • rail.css
  • reset.css
  • reveal.css
  • segment.css
  • site.css
  • step.css

Version

  • Fomantic-UI : 2.7.1
  • Gulp : 4.0.0
  • NPM : 6.7.0
  • Node : 10.8.0

With the same configuration and Semantic-UI (2.4.2), everything is ok.

sylvaindeloux avatar Jan 27 '19 17:01 sylvaindeloux

Can you try npx gulp build-css inside the semantic directory?

ColinFrick avatar Jan 28 '19 06:01 ColinFrick

@ColinFrick Same result with npx gulp build-css

sylvaindeloux avatar Jan 28 '19 07:01 sylvaindeloux

With this package.json:

{
    "dependencies": {
        "fomantic-ui": "^2.7.1"
    },
    "scripts": {
        "build-semantic": "cd semantic && gulp build-css"
    }
}

In this case, I don't need a global Gulp installed but the result is the same.

sylvaindeloux avatar Jan 28 '19 07:01 sylvaindeloux

Could you try to install less dependency directly? npm i less

ColinFrick avatar Jan 28 '19 07:01 ColinFrick

Always the same result ([email protected])

sylvaindeloux avatar Jan 28 '19 07:01 sylvaindeloux

What OS are you on?

This works for me (with default options):

mkdir fui-test && cd fui-test && npm init && npm install fomantic-ui@latest && npx gulp --cwd semantic build-css

Gulp : 4.0.0 NPM : 6.2.0/6.7.0 Node : 10.8.0/11.8.0

What happens if you build everything with gulp build?

ColinFrick avatar Jan 28 '19 07:01 ColinFrick

Humm, this case works and I don't understand why. I dig it and I'll reply when I found something, thanks :)

sylvaindeloux avatar Jan 28 '19 08:01 sylvaindeloux

I think I'm possibly hitting a very similar issue here. I've modified my site.variables to change some colors and launched an npx gulp build-css as usual in the semantic directory. Here's the output:

npx gulp build-css

[14:28:54] Using gulpfile ~/fomanticui/nova/semantic/gulpfile.js [14:28:54] Starting 'build-css'... [14:28:54] Starting 'Building uncompressed CSS'... [14:28:54] Starting 'Building compressed CSS'... [14:28:56] Created: dist/components/reset.css [14:28:56] Created: dist/components/reset.min.css [14:28:56] Created: dist/components/site.min.css [14:28:56] Created: dist/components/site.css [14:28:58] Created: dist/components/button.css [14:28:58] Created: dist/components/button.min.css [14:28:59] Created: dist/components/container.css [14:28:59] Created: dist/components/container.min.css [14:28:59] Created: dist/components/divider.min.css [14:28:59] Created: dist/components/divider.css [14:28:59] Created: dist/components/flag.css [14:28:59] Created: dist/components/flag.min.css [14:29:00] Created: dist/components/header.css [14:29:00] Created: dist/components/header.min.css [14:29:01] Created: dist/components/icon.min.css [14:29:01] Created: dist/components/icon.css [14:29:01] Created: dist/components/image.css [14:29:01] Created: dist/components/image.min.css [14:29:01] Created: dist/components/input.min.css [14:29:01] Created: dist/components/input.css [14:29:02] Created: dist/components/label.css [14:29:02] Created: dist/components/label.min.css [14:29:02] Created: dist/components/placeholder.min.css [14:29:02] Created: dist/components/placeholder.css [14:29:02] Created: dist/components/reveal.css [14:29:02] Created: dist/components/reveal.min.css [14:29:02] Created: dist/components/rail.min.css [14:29:02] Created: dist/components/rail.css [14:29:03] Created: dist/components/segment.min.css [14:29:03] Created: dist/components/segment.css [14:29:03] Created: dist/components/step.min.css [14:29:03] Created: dist/components/step.css [14:29:03] Finished 'Building uncompressed CSS' after 8.45 s [14:29:03] Starting 'Packing uncompressed CSS'... [14:29:03] Finished 'Building compressed CSS' after 8.47 s [14:29:03] Starting 'Packing compressed CSS'... [14:29:13] Created: dist/semantic.min.css [14:29:13] Finished 'Packing compressed CSS' after 10 s [14:29:13] Created: dist/semantic.css [14:29:13] Finished 'Packing uncompressed CSS' after 10 s [14:29:13] Finished 'build-css' after 19 s

It seems that only some components were updated.

donaggio avatar Jun 13 '19 12:06 donaggio

This problem disappeared for me too when starting from scratch, so I made a diff from a clean installation and my working dir and noticed that some files were not updated from release to release of sui (before) and fui (more recently). Most important ones were src/semantic.less and src/theme.config. After re-aligning everyhting to a clean installation of fui, my working dir build started to work again.

donaggio avatar Jun 14 '19 09:06 donaggio

I found this line in my semantic.json file: "components": []

I removed that line and it's now fixed for me.

mrkvn avatar Sep 05 '19 12:09 mrkvn