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.

fix: routing is not working & ionicons not importing correctly

See original GitHub issue

🐛 The bug

routing is absolutely broken with me, in addition to the issue that nothing works unless i install @ionic/vue and icons are not importing correctly

icons error: image

what happens when I change tabs: image

as you can see the tabs just get displayed together

if I change tabs again this comes in the console: image

app.vue:

<template lang="pug">
ionApp
  UiTabs
</template>

components/Ui/Tabs.vue:

<template lang="pug">
ionPage
   ionTabs
      ionRouterOutlet
      //- https://ionicframework.com/docs/vue/navigation#working-with-tabs
      ionTabBar(slot="bottom")
         ionTabButton(tab="home" href="/tabs/home")
            ionIcon( :icon="ioniconsHome" )
            ionLabel Home
         ionTabButton(tab="schedule" href="/tabs/schedule")
            ionIcon( :icon="ioniconsCalendar" )
            ionLabel Schedule
</template>

pages/tabs/Home.vue

<template lang="pug">
h1 this is the home tab
</template>

pages/tabs/Schedule.vue

<template lang="pug">
h1 this is the schedule tab
</template>

🛠️ To reproduce

https://github.com/NyllRE/ionic-nuxt-3

🌈 Expected behaviour

  • tabs change correctly
  • icons get imported and displayed

ℹ️ Additional context

I tried to remake the project multiple times and these errors keep coming, I install @nuxtjs/ionic and no component is known, I install @ionic/vue and the routing is broken, I install @ionic/vue-routing and the ionicons are not working and the routing is broken. nothing seems to be working fine with my experience

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
Lexpearthacommented, Dec 23, 2022

Hey @NyllRE, I’ve created NyllRE/ionic-nuxt-3#1 which hopefully resolves your issues.

Firstly, it seems that using pug didn’t properly work with ionic (might be related to nuxt/framework#6049). After externalizing vue dependencies it seems to work alright (cc @danielroe would appreciate if you could take a look, since this might hint at some bigger underlying issue)

Secondly I think you forgot to put IonPage and IonContent in your pages, as official ionic docs mention

Let me know if you need further assistance or If I can close the issue 😁

0reactions
NyllREcommented, Dec 26, 2022

I forgot to mention an important detail, building the app and serving it works fine, the issue is specifically with running it in a dev environment npm run dev, so this could be an issue with the bundler not working properly

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with routing in Ionic 4
How do i solve this problem? ... The route ( tabs3 ) that you are trying to load is does not exist. make...
Read more >
bug: Ionic/vue ionicons error · Issue #18640 - GitHub
I've applied the solution of @Abdlrahmansaber. But it's not working properly (the compile warning and console error disapeared).
Read more >
Angular Routing- I have no errors but I cannot do the routing. I ...
I want to route from app to homepage. Here is the code. For App: app-routing.module.ts import { NgModule } from ...
Read more >
Navigating the Change with Ionic 4 and Angular Router
After creating pages with the CLI your app-routing.module.ts will automatically be changed, which may or may not help you in some cases.
Read more >
Troubleshooting Angular routing - Medium
No matched component is displayed — did you add <router-outlet> to your app.component.html, index.html or the entry component of the lazy-loaded module? If...
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