Vue-router: Cannot read property '_normalized' of undefined

Created on 7 Nov 2019  Â·  6Comments  Â·  Source: vuejs/vue-router

Version

3.0.7

Reproduction link

https://fr.nuxtjs.org/api/configuration-generate/

Steps to reproduce

yarn run generate or npm run generate in nuxt project

What is expected?

TypeError: Cannot read property '_normalized' of undefined
at normalizeLocation

What is actually happening?

build

Most helpful comment

I'm experiencing the same problem with Vue and not Nuxt. This is the stack trace:

TypeError: Cannot read property '_normalized' of undefined
    at normalizeLocation (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:971:12)
    at Object.match (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:1493:20)
    at VueRouter.match (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2852:23)
    at AbstractHistory.transitionTo (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2146:25)
    at AbstractHistory.push (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2750:10)
    at /home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2952:22
    at new Promise (<anonymous>)
    at VueRouter.push (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2951:12)
    at server.js:334:12
    at new Promise (<anonymous>)

All 6 comments

this is vue-router's repo, not Nuxt's. You should open an issue there (with a proper) and come back if it turns out to be a vue-router bug but please provide a boiled down repro with no nuxt when opening a bug report

I'm experiencing the same problem with Vue and not Nuxt. This is the stack trace:

TypeError: Cannot read property '_normalized' of undefined
    at normalizeLocation (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:971:12)
    at Object.match (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:1493:20)
    at VueRouter.match (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2852:23)
    at AbstractHistory.transitionTo (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2146:25)
    at AbstractHistory.push (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2750:10)
    at /home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2952:22
    at new Promise (<anonymous>)
    at VueRouter.push (/home/ross/emberliteOS/website/node_modules/vue-router/dist/vue-router.common.js:2951:12)
    at server.js:334:12
    at new Promise (<anonymous>)

yesterday works well today not

How did you solve it?

删除掉 layouts\default.vue 中的 script 试试

Try deleting the 'script' in 'layouts\default.vue'

I got same error, when router-link :to was undefined. Check this value.

<router-link :to="undefined">AAAA</router-link>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sqal picture sqal  Â·  3Comments

thomas-alrek picture thomas-alrek  Â·  3Comments

saman picture saman  Â·  3Comments

kerlor picture kerlor  Â·  3Comments

baijunjie picture baijunjie  Â·  3Comments