[Build Tools] Some CSS files are missing after build
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
npm install --save fomantic-ui(with automatic parameters)sudo npm install -g [email protected]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.
Can you try npx gulp build-css inside the semantic directory?
@ColinFrick Same result with npx gulp build-css
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.
Could you try to install less dependency directly?
npm i less
Always the same result ([email protected])
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?
Humm, this case works and I don't understand why. I dig it and I'll reply when I found something, thanks :)
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.
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.
I found this line in my semantic.json file: "components": []
I removed that line and it's now fixed for me.