I was following the guide of vue-router: https://router.vuejs.org/en/advanced/navigation-guards.html
When I do next('/') in one component:
beforeRouteEnter (to, from, next) {
next('/')
},
Server shows:
Error: Cannot read property 'serverRendered' of undefined Show all frames
But works well on browser rendering.
Did I miss anything?
I have opened a pr to fix it: https://github.com/nuxt/nuxt.js/pull/2298
@Atinux this error still exists. At least with router.js plugin
@vaggelis2018 Which version of nuxt.js did you tested?
The PR is after rc11. So you have to do it on latest DEV branch.
For some reason i had version rc9. Installed the latest one but still the same issue.
@vaggelis2018
Use the next tag.
npm install nuxt@next --save
or
yarn add nuxt@next
now i get this error ReferenceError: regeneratorRuntime is not defined during compiling
The error i got was irrelevant. Your solution @NemoAlex was fixed my issue thanks
Doesn't work for me, also tried with 1.1.1 .. seem triggered by having ssr: true in plugin definitions
@jflaflamme are you using vue-material or any other framework?
@vaggelis2018 it was related to a function not able to work in SSR, I just started dev in spa mode instead yarn run dev -s
thanks anyway
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.