Home

Issue: 937

"Error: render function or template not defined in component: anonymous".

[issue link]

Hello,

So I have been attempting to use vue-isotope and masonry with nuxt, however it will work on the initial load but when the page is manually refreshed (not through webpack) I get 2 errors, the first is “Window is not defined” then if I refresh the page again i’ll get “Error: render function or template not defined in component: anonymous”.

I have already set SSR to false for vue-isotope in the nuxt.config and tried to use the “if (process.BROWSER_BUILD) require vueisotope, vue use isotop etc…” method and I still get the same errors.

I’ve had the “window is not defined” problem with previous plugins in the past but they were solved using the method above^ or disabling SSR.

Also i’ve noticed in previous projects using nuxt, when manually refreshing the page certain assets such as images/videos would not be loaded and navigation links would not work, then I have to reload the project again (though this only happened in the build version of nuxt, and may be a separate issue from this one).

Any help would be greatly appreciated, if you need me to upload any images or code snippets let me know.

Thanks

This question is available on Nuxt.js community (#c812)