ReferenceError: __NEXT_DATA__ is not defined
Bug report
Describe the bug
I don't know what this error is. Happens on app start and on every reload. Should I define that var somewhere or am I missing something? I didn't find anything about it on your site.
System information
- OS: all
- Browser (if applies): all
- Version of Next.js: 4.2.1
Definitely should be defined already as it's part of the scripts, I'm going to close this as there's no reproduction, maybe upgrade as you're a few versions behind.
But can you please point me somewhere where I can read what it is and what am I missing to declare?
It's defined as part of the Next.js codebase, you don't have to define it, but I'd be happy to look at a reproduction of the issue 👍
I've got some router passed to props in my index.js page file to redirect from index page to another which probable caused Next not properly define that variable. I ended up using next/router and using this method https://github.com/zeit/next.js/wiki/Redirecting-in-%60getInitialProps%60 and it's no longer throwing that exception!