coreui-icons
coreui-icons copied to clipboard
Flag variable names are uppercase, but SVG files are lowercase
As the title describes, the variables in the SCSS for the flag icons are in uppercase:
https://github.com/coreui/coreui-icons/blob/master/scss/flag/_variables.scss#L3
But the SVG files are in lowercase:
https://github.com/coreui/coreui-icons/tree/master/svg/flag
This results in this error when trying to transpile the SCSS to CSS:
Syntax Error: ModuleNotFoundError: Module not found: Error: Can't resolve '../svg/flag/cif-AD.svg' in '/project/node_modules/@coreui/icons/scss/flag'
Changing the variables to lowercase fixed this for me.
Same here, build error... Does not matter on MacOS/Windows, which have case-insensitive file system, but does matter on Unix builds (Ubuntu e.g.).
Yes, good point, this was on a linux OS.
@mrholek @woothu any update on this one (for icons PRO) please? It is breaking my CI/CD builds on Unix...
Or do you accept PRs? Happy to contribute!
Hi, any update ?
We are also running into this issue, so we have setup the following small script to make our CI/CD builds work:
for src in node_modules/@coreui/icons/svg/flag/*; do
dst=$(echo "$src" | sed -E "s/(.*)\/cif-(.+?)\.svg/\1\/cif-\U\2\E.svg/")
if [ "${src}" != "${dst}" ]; then
# rename the file if something has changed
mv "$src" "$dst"
fi
done
Would be nice to have that fixed so we can get rid of this :)
@jaydiablo @Letrab @oulasri @sideshowcecil I fixed it in the latest release, can you check if this release is ok?
@mrholek the new release 2.0.0-rc.0
is not available for @coreui/icons-pro
.
When switching to the free version and the new release I still get the following error:
ERROR in ./node_modules/@coreui/icons/css/all.min.css (./node_modules/css-loader/dist/cjs.js??ref--13-1!./node_modules/postcss-loader/src??embedded!./node_modules/@coreui/icons/css/all.min.css)
Module Error (from ./node_modules/postcss-loader/src/index.js):
(Emitted value instead of an instance of Error) CssSyntaxError: [redacted]/css/all.css:6408:20: Can't resolve '../svg/flag/cif-ZW.svg' in '[redacted]/node_modules/@coreui/icons/css'
6406 |
6407 | .cif-zw {
> 6408 | background-image: url(../svg/flag/cif-ZW.svg);
| ^