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.

bug: [Ionic 4.6.0] Icons not loaded in prod using relative path

See original GitHub issue

Bug Report

Ionic version:

[x] 4.6.0

Current behavior:

Building ionic app with ionic build --prod and publish it in prod environment. Load the app then icons are not displayed.

Expected behavior:

Should be able to load ionicons. This was working perfect when @ionic/angular@4.5.0. We had to downgrade to 4.5.0 :c

Steps to reproduce:

Upgrade from 4.5.0 to 4.6.0 version, building ionic app with ionic build --prod and publish it in prod environment

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 5.1.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.5.0
   @angular-devkit/build-angular : 0.13.0
   @angular-devkit/schematics    : 7.2.3
   @angular/cli                  : 7.3.1
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 14 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   ios-sim : 8.0.1
   NodeJS  : v10.16.0 (/usr/local/bin/node)
   npm     : 6.9.0
   OS      : macOS Mojave
   Xcode   : Xcode 10.2.1 Build version 10E1001

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidWiesnercommented, Jul 1, 2019

I have the same issue. I have an ionic site in a subfolder e.g.: example.com/backend/ of my server. But the production build will try to load the icons from the absolute path /svg/ so from example.com/svg/ and this will fail because all icons are in example.com/backend/svg/. Also in android/ios apps the icons disappear after updating to ionic 4.6.0. This issue may is a duplicate of #18614 ?!

1reaction
jakechen0816commented, Jun 28, 2019

same situation, after rm -rf node_modules and re-run npm i does not work. 404 Error 0.0.0.0/svg/md-menu.svg

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: [Ionic 4.6.0] Icons not loaded in prod using relative path ...
Building ionic app with ionic build --prod and publish it in prod environment. Load the app then icons are not displayed. Expected behavior:....
Read more >
Ionicons not working Ionic V4 after NPM update - Stack Overflow
I had an issue with some Ionicons that were not displayed but now none of them are showing on my testing environment. None...
Read more >
Small, Efficient Web Build. How? - ionic-v3
When I run any type of build EXCEPT a production build, it works fine. The app works, the web site in the WWW...
Read more >
Ionicons Usage Guide
When using icons in Ionic Framework you can specify different icons per platform. Use the md and ios attributes and provide the platform...
Read more >
signature=14611b395b980b0944234a35b2c772db,ionic ...
angular: resolve error when not using ngModel on components (4083e32) ... toast: allow loading ion-icon from asset path (#18969) (23f327e).
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