-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document is not defined #18
Comments
Solution for NUXTThis is happening because Vcalendar is not meant to be rendered on the server side. At least that's what I've read. What solved the issue for me was: Step 1. Add a plugin in {ROOT_DIRECTORY}/plugins/vcalendar.js with following contents:
Step 2. Include the newly created plugin in the {ROOT_DIRECTORY}/nuxt.config.js as follows:
This solved a similar issue for me |
This solution is only for nuxt.js |
Sorry, I was actually having a same issue on Nuxtjs and I was looking for a solution. Once I found it, just had a little brainfart and thought this was in the nuxt repository 😁 My apologies. |
I'm struggling with this issue when I try to load my project in the browser.
error during render : /favicon.ico
ReferenceError: document is not defined
at addStyle (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:3180:22)
at addStylesToDom (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:3164:20)
at addStylesClient (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:3118:3)
at Object.8e2e (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:5849:14)
at webpack_require (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:30:30)
at Object.dd71 (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:8991:509)
at webpack_require (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:30:30)
at Module.fb15 (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:13077:75)
at webpack_require (/Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:30:30)
at /Users/matheuslira/IdeaProjects/ingresso-prime-ssr/node_modules/v-calendar/lib/components/date-picker.umd.js:94:18
The text was updated successfully, but these errors were encountered: