Navigation broken in Prod build?

Hi,

This happens with the prod build (release not needed to reproduce):

  • accessing root URL of the app is fine.
  • refreshing the app (supposing it has affected the url) breaks: “not found”.

The problem can easily be reproduced:

  • use the latest ionic
  • ionic start app-test
  • let’s say “tabbed”
  • cd app-test
  • ionic build --prod (–release is not necessary)
  • serve/deploy www
  • access root url -> works
  • ensure that the route has been appended (like “/home”)
  • refresh
  • crash

I’ll test on another computer to ensure it’s not my setup that’s broken; in the meantime, I’ll be glad to know if this is a known issue.

Thanks in advance for the attention,

My ionic info:


Ionic:

   Ionic CLI                     : 5.2.3 (C:\Users\jem\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.7.1
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Utility:

   cordova-res : 0.6.0
   native-run  : 0.2.8

System:

   NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.9.0
   OS     : Windows 10

Ok, the problem also happens on a different system. I’ve created a bug report:

have you tried it now it is resolved.

cheers!!

Hi Ishaquemujtaba,
I might be missing something since npm update’ing the project didn’t fix this; When was this resolved tell me?

Thanks!

Sorry, my mistake - I forgot the rewrite rule, which fixes the issue:

Configure as a single-page app (rewrite all urls to /index.html)?" Enter “Yes”.

Today I decided stop working with ionic I have found many issues every update has many issues

Hi Lesther7,
That’s your decision - not sure it’s relevant regarding the original topic. Since you open the topic of opinions, I’m super happy with Ionic, especially V4 since it allows unrestricted Angular use.

Best wishes for your future endeavors!

Is this for firebase or to any hosting?? I get same error deploying in my hosting.