mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[GH-ISSUE #369] error on line 8 at column 1: Extra content at the end of the document #227
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @popovoleksandr on GitHub (May 22, 2017).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/369
Could you please help me. I'm using Laravel and your package installed using npm.

However I got this error
@lipis commented on GitHub (May 22, 2017):
Works here: https://lipis.github.io/flag-icon-css/flags/4x3/ua.svg
@popovoleksandr commented on GitHub (May 22, 2017):
Yes I can see that... however following source code is delivered by above link:
basicly for all flags delivered smth different. For instance for /fonts/ga.svg?3bccb26524d04e3abb3dc4fa8b5047df
@popovoleksandr commented on GitHub (May 22, 2017):
BTW /fonts/gb.svg?fd72d9b5184b47afb2f7b4db0c8a35de is working perfectly fine... I'm bit confused.
I cleaned and republished node_modules but it did not helped
@Findus23 commented on GitHub (May 22, 2017):
https://lipis.github.io/flag-icon-css/flags/4x3/ua.svg returns
for me. Have you got any browser extension which modifies the response?
@popovoleksandr commented on GitHub (May 22, 2017):
@Findus23 on GitHub it working fine... Im not able to get it into my code fully :(
Thus any help is really appreciated
@Findus23 commented on GitHub (May 22, 2017):
Maybe open the local svg file in the node_modules folder and check if it has a duplicate
</svg>@popovoleksandr commented on GitHub (May 22, 2017):
Double checked - local files are fine...
@Findus23 commented on GitHub (May 22, 2017):
The next step would be checking the http request in the developer tools
@lipis commented on GitHub (May 22, 2017):
also try from different browser.
@popovoleksandr commented on GitHub (May 22, 2017):
Thanks for support. However followng are dev tools both Chrome and Firefox:

@Findus23 commented on GitHub (May 22, 2017):
If you click on the request, you can see its content:

@popovoleksandr commented on GitHub (May 22, 2017):
Could you tell me what should I look for? Thanks!
@Findus23 commented on GitHub (May 22, 2017):
Check in "Response" if the duplicate
</svg>is also there@popovoleksandr commented on GitHub (May 22, 2017):
@lipis could you help me understand how route like /font/*svg is working?
@Findus23 yes it contains that is weird :(
@lipis commented on GitHub (May 22, 2017):
What do you mean?! If you just open that SVG in your browser does it work?! If the answer is yes.. then the problem is not in the svg.. but the way you use it..
@popovoleksandr commented on GitHub (May 22, 2017):
SOrry if it was misunderstanding.
As you can see on my screenshot I sent hour ago it is not displayed for UA and RU but showed for GB. SO answer is Yes and No. I'm using it like this:
<span class="flag-icon flag-icon-ru"></span>After I got following style class
If I go to that link I will receive:
@popovoleksandr commented on GitHub (May 22, 2017):
@lipis could you point me out where I'm doing mistake. Thank you!
@lipis commented on GitHub (May 22, 2017):
No I can't sorry.. the SVG is correct and the last two lines are added by your setup.. remove those lines and it will be fixed!
@popovoleksandr commented on GitHub (May 22, 2017):
Pity.. anyway thanks for your time
@lipis commented on GitHub (May 22, 2017):
Pity?! How do you think we should help you exactly?! Should we start using Laravel, try to guess your full setup? try to guess your browsers, your machine and all your pipeline to figure out what is wrong with the rendering of SVG that actually is correct?!
@popovoleksandr commented on GitHub (May 22, 2017):
No of cource not... I just said thank you for your time.
Youre right npm is adding this during compilation. But I'm not sure why and how to fix it.
@lipis commented on GitHub (May 22, 2017):
np.. and good luck.
@Outridair commented on GitHub (Apr 23, 2018):
Hey Love your work here @lipis thanks for making this package.
I think I have the solution for @anantaramdas here.
When using laravel-mix for compiling the sass and js files, if you use the sass version.
@import './components/flags/flag-icon.scss';This will add that terrible extra few lines on the end, something wrong with how the default laravel-mix configuration is perhaps.
However if you follow -> https://github.com/lipis/flag-icon-css/issues/428
And add it to the app.js file after an npm install
import 'flag-icon-css/css/flag-icon.css'Everything should compile like normal, and you can add the flags as per the README.MD
Hope that helps!
@lipis commented on GitHub (Apr 23, 2018):
@The-Outrider do we have to update anything in the project, or it's just how people are using with different packages/frameworks?
@Outridair commented on GitHub (Apr 23, 2018):
@lipis I believe this is an issue in the laravel-mix package, and no code changes need to be made here. 👍
@lipis commented on GitHub (Apr 23, 2018):
Thanks @The-Outrider
@GwFreak01 commented on GitHub (Sep 24, 2019):
@anantaramdas
Hey, I am running into the same issue and was curious what your solution was. In my case, it seems that Webpack is trying to bundle/compile these assets and something related to the write buffer is adding on the extra gibberish at the end, but I'm not too exactly sure.
Any lead would help!
Thanks!