Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag variable names are uppercase, but SVG files are lowercase #21

Open
jaydiablo opened this issue Jun 10, 2020 · 7 comments
Open

Flag variable names are uppercase, but SVG files are lowercase #21

jaydiablo opened this issue Jun 10, 2020 · 7 comments

Comments

@jaydiablo
Copy link

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.

@Letrab
Copy link

Letrab commented Jun 11, 2020

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.).

@jaydiablo
Copy link
Author

Yes, good point, this was on a linux OS.

@Letrab
Copy link

Letrab commented Sep 22, 2020

@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!

@oulasri
Copy link

oulasri commented Oct 22, 2020

Hi, any update ?

@sideshowcecil
Copy link

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 :)

@mrholek
Copy link
Member

mrholek commented Nov 18, 2020

@jaydiablo @Letrab @oulasri @sideshowcecil I fixed it in the latest release, can you check if this release is ok?

@sideshowcecil
Copy link

@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);
       |                    ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants