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.

Uncaught TypeError: Cannot read property 'route' of undefined in Vue.JS 3.5.5

See original GitHub issue
  • Framework7 version: ^4.2.2
  • Vue.js version: 3.5.5
  • Platform and Target: Google Chrome

Here’s the console log error

Uncaught TypeError: Cannot read property ‘route’ of undefined at Router.back (back.js?770e:577) at Framework7.handleClicks (clicks.js?9dd2:82) at eval (events-class.js?8085:79) at Array.forEach (<anonymous>) at eval (events-class.js?8085:78) at Array.forEach (<anonymous>) at Framework7.emit (events-class.js?8085:72) at emitAppTouchEvent (touch.js?460e:663) at HTMLDocument.appClick (touch.js?460e:669) back @ back.js?770e:577 handleClicks @ clicks.js?9dd2:82 (anonymous) @ events-class.js?8085:79 (anonymous) @ events-class.js?8085:78 emit @ events-class.js?8085:72 emitAppTouchEvent @ touch.js?460e:663 appClick @ touch.js?460e:669

hC97wmf0tK

It works at first but after the 2nd try, then it throws an error on the console log.

Here’s my App.vue

<template>
  <div id="app">
    <f7-app :params="f7params">
      <f7-view
        tab
        main
        url="/home/"
      >
      </f7-view>
    </f7-app>
  </div>
</template>

<style>
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
</style>

<script>
import routes from "./router";
export default {
  data: () => ({
    f7params: {
      name: "My App",
      id: "com.myapp.test",
      theme: "auto",
      routes: routes
    }
  })
};
</script>

Here’s my sample Something Page

<template>
  <div>
    <f7-page :page-content="false">
      <f7-navbar title="Something" back-link="Back">
        <f7-nav-right>
          <f7-link
            icon-ios="f7:reload"
            icon-aurora="f7:reload"
            icon-md="material:compare_arrows"
          ></f7-link>
        </f7-nav-right>
      </f7-navbar>
    </f7-page>
  </div>
</template>

Any help? I’m new with framework7io for Vue and I don’t know why it shows an error even those are just from docs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
geri777commented, Nov 14, 2019

I have the same problem when I use links with parameters like path: ‘/segement/:id?’

2reactions
geri777commented, Nov 18, 2019

I have now found out that the app does not crash. It is just closed to the Background. When I press the button for the active apps selection, it’s there and I can open it again. Looks like if the router does not push the navigation events to the OS (however this works).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue-Router: Cannot read property '$route' of undefined - VueJS
I use Nuxt and your code for SSR not work: Error: Cannot read property $route of undefined <script> async asyncData ({ store, route...
Read more >
Cannot read property '$route' of undefined in vue3 - Vue Forum
I am following the tutorial on Vue School. It seems okay until using the named routes and params. It renders a blank page...
Read more >
[Vue 3 & Vite 2] Uncaught (in promise) TypeError: Cannot read ...
Can't get Login page and prompt displayed, `Uncaught TypeError: Cannot read property 'login' of undefined` · Running into crash in auth-spa ...
Read more >
[Solved]-"TypeError: Cannot read property of undefined"-Vue.js
Coding example for the question "TypeError: Cannot read property of undefined"-Vue.js.
Read more >
cannot read property 'router' of undefined - You.com
Cannot read property '_router' of undefined Vue js ... In my main component I have a click link where I am calling a...
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