[GH-ISSUE #431] Failing build some country icons because of unresolved '%23b' #263

Closed
opened 2026-03-03 14:35:54 +03:00 by kerem · 12 comments
Owner

Originally created by @aligit on GitHub (Feb 21, 2018).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/431

Despite successfull npm install, some countries such as nu.svg, nz.svg, np.svg are causing npm start failure.

Here is the error I'm getting:

ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/flag-icon-css/css/flag-icon.css
(Emitted value instead of an instance of Error) CssSyntaxError: F:\repositories\platformui\node_modules\flag-icon-css\css\flag-icon.css:1042:1393: Can't resolve '%23c' in 'F:\repositories\platformui\node_modules\flag-icon-css\css'

If I comment these flags in node_modules, the server successfully starts.

Environment:
Windows 10
npm --version 5.6.0

Below is the package.json:


{
  "name": "indigitaUI",
  "version": "1.0.0-snapshot",
  "description": "indigita UO",
  "author": "indigita SA",
  "url": "https://www.indigita.ch",
  "copyright": "",
  "license": "",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --proxy-config proxy.conf.json",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "5.1.0",
    "@angular/common": "5.1.0",
    "@angular/compiler": "5.1.0",
    "@angular/core": "5.1.0",
    "@angular/forms": "5.1.0",
    "@angular/http": "5.1.0",
    "@angular/platform-browser": "5.1.0",
    "@angular/platform-browser-dynamic": "5.1.0",
    "@angular/router": "5.1.0",
    "@angular/upgrade": "5.1.0",
    "@swimlane/ngx-charts": "^7.0.1",
    "angular2-jwt": "0.2.3",
    "bootstrap": "^4.0.0-beta",
    "chart.js": "2.7.1",
    "core-js": "2.5.1",
    "d3": "^4.12.0",
    "flag-icon-css": "^2.9.0",
    "jquery": "^3.2.1",
    "moment": "2.19.3",
    "ng2-charts": "1.6.0",
    "ngx-bootstrap": "2.0.0-beta.10",
    "popper.js": "^1.12.9",
    "primeng": "^5.0.2",
    "rxjs": "5.5.5",
    "spinkit": "1.2.5",
    "tether": "^1.4.3",
    "ts-helpers": "1.1.2",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.4.2",
    "@angular/compiler-cli": "5.1.0",
    "@types/jasmine": "2.8.2",
    "@types/node": "8.0.56",
    "codelyzer": "4.0.1",
    "jasmine-core": "2.8.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "1.7.1",
    "karma-chrome-launcher": "2.2.0",
    "karma-coverage-istanbul-reporter": "1.3.0",
    "karma-jasmine": "1.1.1",
    "karma-jasmine-html-reporter": "0.2.2",
    "protractor": "5.2.1",
    "ts-node": "3.3.0",
    "tslint": "5.8.0",
    "typescript": "2.4.2"
  }
}
Originally created by @aligit on GitHub (Feb 21, 2018). Original GitHub issue: https://github.com/lipis/flag-icons/issues/431 Despite successfull npm install, some countries such as nu.svg, nz.svg, np.svg are causing npm start failure. Here is the error I'm getting: > ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/flag-icon-css/css/flag-icon.css (Emitted value instead of an instance of Error) CssSyntaxError: F:\repositories\platformui\node_modules\flag-icon-css\css\flag-icon.css:1042:1393: Can't resolve '%23c' in 'F:\repositories\platformui\node_modules\flag-icon-css\css' If I comment these flags in node_modules, the server successfully starts. Environment: Windows 10 npm --version 5.6.0 Below is the package.json: ```json { "name": "indigitaUI", "version": "1.0.0-snapshot", "description": "indigita UO", "author": "indigita SA", "url": "https://www.indigita.ch", "copyright": "", "license": "", "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.conf.json", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "5.1.0", "@angular/common": "5.1.0", "@angular/compiler": "5.1.0", "@angular/core": "5.1.0", "@angular/forms": "5.1.0", "@angular/http": "5.1.0", "@angular/platform-browser": "5.1.0", "@angular/platform-browser-dynamic": "5.1.0", "@angular/router": "5.1.0", "@angular/upgrade": "5.1.0", "@swimlane/ngx-charts": "^7.0.1", "angular2-jwt": "0.2.3", "bootstrap": "^4.0.0-beta", "chart.js": "2.7.1", "core-js": "2.5.1", "d3": "^4.12.0", "flag-icon-css": "^2.9.0", "jquery": "^3.2.1", "moment": "2.19.3", "ng2-charts": "1.6.0", "ngx-bootstrap": "2.0.0-beta.10", "popper.js": "^1.12.9", "primeng": "^5.0.2", "rxjs": "5.5.5", "spinkit": "1.2.5", "tether": "^1.4.3", "ts-helpers": "1.1.2", "zone.js": "0.8.18" }, "devDependencies": { "@angular/cli": "^1.4.2", "@angular/compiler-cli": "5.1.0", "@types/jasmine": "2.8.2", "@types/node": "8.0.56", "codelyzer": "4.0.1", "jasmine-core": "2.8.0", "jasmine-spec-reporter": "4.2.1", "karma": "1.7.1", "karma-chrome-launcher": "2.2.0", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.1", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.2.1", "ts-node": "3.3.0", "tslint": "5.8.0", "typescript": "2.4.2" } } ```
kerem closed this issue 2026-03-03 14:35:55 +03:00
Author
Owner

@griffiti commented on GitHub (Feb 21, 2018):

I'm getting the same error.

Environment:
Windows 10
Node 9.5.0

Error:
ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/flag-icon-css/css/flag-icon.css
(Emitted value instead of an instance of Error) CssSyntaxError: C:\dev\projects\simpliq-full\node_modules\flag-icon-css\css\flag-icon.css:166:399: Can't resolve '%23a' in 'C:\dev\projects\simpliq-full\node_modules\flag-icon-css\css'

Occurring for the following countries:
np
nu
nz
sl
za
bj

<!-- gh-comment-id:367372099 --> @griffiti commented on GitHub (Feb 21, 2018): I'm getting the same error. **Environment:** Windows 10 Node 9.5.0 **Error:** ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/flag-icon-css/css/flag-icon.css (Emitted value instead of an instance of Error) CssSyntaxError: C:\dev\projects\simpliq-full\node_modules\flag-icon-css\css\flag-icon.css:166:399: Can't resolve '%23a' in 'C:\dev\projects\simpliq-full\node_modules\flag-icon-css\css' Occurring for the following countries: np nu nz sl za bj
Author
Owner

@aldenteTarnow commented on GitHub (Feb 21, 2018):

Despite the error. How do you include and use flags with angular?? Are you guys using angular 5? Can someone guide me how to???

<!-- gh-comment-id:367479462 --> @aldenteTarnow commented on GitHub (Feb 21, 2018): Despite the error. How do you include and use flags with angular?? Are you guys using angular 5? Can someone guide me how to???
Author
Owner

@griffiti commented on GitHub (Feb 21, 2018):

I'm using Angular 5.2.5. Here's how the flags are being used:

<i class="flag-icon flag-icon-ad h1" title="ad" id="ad"></i>

<!-- gh-comment-id:367491947 --> @griffiti commented on GitHub (Feb 21, 2018): I'm using Angular 5.2.5. Here's how the flags are being used: `<i class="flag-icon flag-icon-ad h1" title="ad" id="ad"></i>`
Author
Owner

@lipis commented on GitHub (Feb 22, 2018):

Can you have the minimum number of dependencies that are causing this error?

<!-- gh-comment-id:367546323 --> @lipis commented on GitHub (Feb 22, 2018): Can you have the minimum number of dependencies that are causing this error?
Author
Owner

@kloasn commented on GitHub (Feb 22, 2018):

Updating to the latest version of angular/cli (1.7.1) resolves the issue.

<!-- gh-comment-id:367620187 --> @kloasn commented on GitHub (Feb 22, 2018): Updating to the latest version of angular/cli (1.7.1) resolves the issue.
Author
Owner

@aligit commented on GitHub (Feb 22, 2018):

I manage to fix it by restoring package-lock.json. I've also upgraded my @angular/cli from 1.4.2 to 1.6.0

<!-- gh-comment-id:367622420 --> @aligit commented on GitHub (Feb 22, 2018): I manage to fix it by restoring package-lock.json. I've also upgraded my @angular/cli from 1.4.2 to 1.6.0
Author
Owner

@lipis commented on GitHub (Feb 22, 2018):

so I guess we can close this issue?

<!-- gh-comment-id:367637184 --> @lipis commented on GitHub (Feb 22, 2018): so I guess we can close this issue?
Author
Owner

@aligit commented on GitHub (Feb 22, 2018):

For me that's fine. @griffiti did you manage to fix it by upgrading your angular.

<!-- gh-comment-id:367703654 --> @aligit commented on GitHub (Feb 22, 2018): For me that's fine. @griffiti did you manage to fix it by upgrading your angular.
Author
Owner

@stychu commented on GitHub (Feb 23, 2018):

@griffiti

I'm using Angular 5.2.5. Here's how the flags are being used:
<i class="flag-icon flag-icon-ad h1" title="ad" id="ad"></i>

And how to include the library to be able to use the css?

<!-- gh-comment-id:367996346 --> @stychu commented on GitHub (Feb 23, 2018): @griffiti >I'm using Angular 5.2.5. Here's how the flags are being used: >`<i class="flag-icon flag-icon-ad h1" title="ad" id="ad"></i>` And how to include the library to be able to use the css?
Author
Owner

@kaleidocore commented on GitHub (Mar 24, 2018):

I too can confirm that updating to angular/cli 1.7.3 resolved the issue. In fact, I just ran
npm update
in my angular project folder, and bunch of stuff got upgraded and the compile errors disappeared.

@stychu

And how to include the library to be able to use the css?

I'm using the latest Angular 5 SPA template.

  1. Install the module with npm:

npm install flag-icon-css

  1. For testing purposes you can add it globally in styles.css:

@import "~flag-icon-css/css/flag-icon.css";

  1. Finally, just use the tag in your html, e.g. in home.component.html:

<span class="flag-icon flag-icon-se flag-icon-squared"></span>

<!-- gh-comment-id:375911212 --> @kaleidocore commented on GitHub (Mar 24, 2018): I too can confirm that updating to angular/cli 1.7.3 resolved the issue. In fact, I just ran `npm update` in my angular project folder, and bunch of stuff got upgraded and the compile errors disappeared. @stychu > And how to include the library to be able to use the css? I'm using the latest Angular 5 SPA template. 1. Install the module with npm: `npm install flag-icon-css` 2. For testing purposes you can add it globally in styles.css: `@import "~flag-icon-css/css/flag-icon.css";` 3. Finally, just use the tag in your html, e.g. in home.component.html: `<span class="flag-icon flag-icon-se flag-icon-squared"></span>`
Author
Owner

@sushil302 commented on GitHub (Jun 28, 2018):

@lipis @kaleidocore Hi i am using Angularjs 1.3.13 and using flag-icon-css i am only able to display us and gb flag and not able to display any other flags. i tried doing npm update but didnt work for me.
Anyone know solution on it?

<!-- gh-comment-id:401148254 --> @sushil302 commented on GitHub (Jun 28, 2018): @lipis @kaleidocore Hi i am using Angularjs 1.3.13 and using flag-icon-css i am only able to display us and gb flag and not able to display any other flags. i tried doing npm update but didnt work for me. Anyone know solution on it?
Author
Owner

@lipis commented on GitHub (Sep 26, 2018):

Not sure what we can do here.. seems fine from my end :)

<!-- gh-comment-id:424798270 --> @lipis commented on GitHub (Sep 26, 2018): Not sure what we can do here.. seems fine from my end :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#263
No description provided.