question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4.6.0] bug: svg file is not found when use baseHref

See original GitHub issue

Bug Report

Ionic version:

[x] 4.6

Current behavior:

all of ionic icon svg file is not found (404)

Expected behavior:

Steps to reproduce:

Related code:

https://github.com/Jimmysh/ionic-4.6.0-bug

angular.json
{
  "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
  "version": 1,
  "defaultProject": "app",
  "newProjectRoot": "projects",
  "projects": {
    "app": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "app",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "www",
            "index": "src/index.html",
            "main": "src/main.ts",
            "baseHref": "/en/",   --- use baseHref

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 5.0.0-beta.2 (/Users/jimmy/.config/yarn/global/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.6.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Utility:

   cordova-res : 0.3.0
   native-run  : not installed

System:

   NodeJS : v10.16.0 (/Users/jimmy/.nvm/versions/node/v10.16.0/bin/node)
   npm    : 6.9.0
   OS     : macOS

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
liamdebeasicommented, Jul 16, 2019

This was fixed in 4.6.1.

3reactions
liamdebeasicommented, Jun 27, 2019

Thanks for the issue. It looks like you are trying to modify the baseHref of your application. Certain things like ionicons need to be served from the root in order to work properly.

If you would like to change your app’s routing structure, we recommend using the Angular Router to accomplish this, not a project/build configuration file.

I am going to close this as this is not an Ionic bug.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v4.6.0] bug: svg file is not found when use baseHref #18637
Thanks for the issue. It looks like you are trying to modify the baseHref of your application. Certain things like ionicons need to...
Read more >
SVG filter url is not working in angular 4
Seems like angular adds tag like <base href="/dist/"> and safari or firefox can't resolve url. To fix it, you should prepend filter id's...
Read more >
Safari Technology Preview Release Notes
If you see bugs or unexpected behavior with the interface of Safari Technology Preview, please file feedback with Apple's Feedback Assistant.
Read more >
angular js app 404 not found on kubernetes
I followed the latest tutorial and it works perfectly fine. I presume you have made the file with the wrong name. Instead of...
Read more >
Overview
Phishing site detected (based on logo template match). HTML body contains low number of good links. HTML title does not match URL. Suspicious...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found