Nuxt.js: Cannot read property toLowerCase of undefined

Created on 24 Jul 2019  路  6Comments  路  Source: nuxt/nuxt.js

Version

v2.8.1

Reproduction link

https://cmty.app

Steps to reproduce

Sorry for no repo as I'm not sure what is causing this but I'l do my best to explain what I found out
This issue is caused by the ssr trying to render the page and finding a comment block
brave_2uQ9VVuJnD.png
brave_n8Yrq1ABy1.png
This comment appears under the __nuxt div:
brave_EerK58t9i3.png

I have no idea why is this comment showing up there.

This is a random issue, as removing node modules and package.lock then reinstalling (might) fix this, or it might not, it might cause it, randomly.
Honestly I've been trying to solve this for the last 2 days and I'm about to lose my mind about that comment that just shows up and disappears every time

Please help and dont shun me for not opening a repo I just cant.

What is expected ?

explained above

What is actually happening?

explained above

This bug report is available on Nuxt community (#c9537)
bug-report

All 6 comments

I have the same issue! Tried multiple workarounds, but I didn't have any luck.

I've found that clearing localStorage removes this error so the nuxt@auth module may be responsible...

Edit: nevermind, this was caused by SSR issues. Wrapping some of my components in the <no-ssr /> tag fixed this.

this usually happens when:

  • Your HTML is invalid
  • You use stateful markup (e.g. authentication state) on server and client side

If you do the latter, you canwrap all your auth checks in your markup in NoSsr components for a workaround.

It's a bit difficult to explain, but I'll write a bit up on that later.

Your state should be same on ssr and client. See https://ssr.vuejs.org/guide/hydration.html

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gary149 picture gary149  路  3Comments

vadimsg picture vadimsg  路  3Comments

mikekidder picture mikekidder  路  3Comments

vadimsg picture vadimsg  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments