Skip to content

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

Closed

Description

@eulerchavez

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

Activity

  1. liamdebeasi commented on Jun 28, 2019

    @liamdebeasi
    Contributor

    Thanks for the issue! I two questions that will help me figure out what's going on:

    1. How are you setting the relative path?
    2. Can you do rm -rf node_modules and then run npm i to see if things start working again?

    Thanks! 🙂

  2. jakechen0816 commented on Jun 28, 2019

    @jakechen0816

    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

  3. added and removed
    needs: replythe issue needs a response from the user
    on Jun 28, 2019
  4. DavidWiesner commented on Jul 1, 2019

    @DavidWiesner
    Contributor

    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 ?!

  5. manucorporat commented on Jul 1, 2019

    @manucorporat
    Contributor

    Fixed by 4038e0a

  6. Snickdx commented on Jul 4, 2019

    @Snickdx

    Issue persists for me. Created a tabs starter project and made a production build, icons not showing and no errors in console.

  7. ionitron-bot commented on Aug 3, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  8. locked and limited conversation to collaborators on Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions