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

missing flags css after fresh install #23

Closed
luckylooke opened this issue Mar 6, 2020 · 4 comments
Closed

missing flags css after fresh install #23

luckylooke opened this issue Mar 6, 2020 · 4 comments

Comments

@luckylooke
Copy link

luckylooke commented Mar 6, 2020

Hello!
Thank you for sharing package
but after installation by

npm i vue-country-flag
+ [email protected]
added 1 package from 1 contributor and audited 939528 packages in 26.977s

I am getting error:

This relative module was not found:
* ./css/flags/flags.min.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-country-flag/src/CountryFlag.vue?vue&type=script&lang=js&

And I have double-checked there is no such folder as css in src in node_modules, I can see it here on github.. but probably problem is in package.json:

"files": [
    "dist/*",
    "src/**/*.vue"
  ],

as you can see css is not included

I have used:
npm -v
6.13.4
for installation

I have tried yarn 1.15.2 .. but same result

Thanks :)

@ubaldop
Copy link
Owner

ubaldop commented Mar 14, 2020

Hi @luckylooke thank you for appreciating this package and pointing out this error! I'll try to fix ASAP.
Alternatively, please feel free to fix it and open a PR :)

@luckylooke
Copy link
Author

I have changed my configuration and the problem disappeared, probably it uses now just code from /dist where those flags are inlined in bundle, so for me it is no more issue, but I am not sure what convenience is here. Whether src folder should be in package files or not.. if so, then corresponding css dependency is missing, if not, maybe you should remove "src/**/*.vue" from package.

:)

@ubaldop
Copy link
Owner

ubaldop commented Mar 17, 2020

@luckylooke thanks! I'll give it a look 😸

@ubaldop ubaldop mentioned this issue Apr 11, 2020
@ubaldop
Copy link
Owner

ubaldop commented Apr 11, 2020

@luckylooke sorry for being late. I've taken your suggestion of getting rid of .vue file in the final npm bundle. Thank you :)

@ubaldop ubaldop closed this as completed Apr 11, 2020
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

2 participants