vue-verification-code-input icon indicating copy to clipboard operation
vue-verification-code-input copied to clipboard

Reload page causes document is not defined

Open stivenramireza opened this issue 5 years ago • 9 comments

Hi,

When I reload page in development mode, I get this error. What does really mean?

I think it just works in production, because I deployed my web app and it when I simulated this behaviour, all was good.

vue-verification-code-input

stivenramireza avatar Aug 13 '20 22:08 stivenramireza

same issue here

Faiza294 avatar Oct 07 '20 10:10 Faiza294

did any one get a solution ?

Faiza294 avatar Oct 07 '20 10:10 Faiza294

No, I haven't gotten a solution yet. @Faiza294

stivenramireza avatar Oct 07 '20 13:10 stivenramireza

use nuxt.js or vue ssr ?

suweya avatar Oct 09 '20 02:10 suweya

use nuxt.js or vue ssr ?

Nuxt.js

stivenramireza avatar Oct 09 '20 02:10 stivenramireza

I think it maybe render in node server, that cause document not defined, i didn't test with nuxt.js

suweya avatar Oct 09 '20 02:10 suweya

I think it maybe render in node server, that cause document not defined, i didn't test with nuxt.js

I'll try using <client-only/>

stivenramireza avatar Oct 09 '20 02:10 stivenramireza

this should solve your problem :

<client-only> <CodeInput /> </client-only>

components: { CodeInput: () => process.client ? import('vue-verification-code-input') : null },

mathieuPaczesny avatar Oct 05 '21 09:10 mathieuPaczesny

this should solve your problem :

<client-only> <CodeInput /> </client-only>

components: { CodeInput: () => process.client ? import('vue-verification-code-input') : null },

thanks as you said this worked on Nuxt2 but in Nuxt 3 it doesnt work and i tried many ways

no result yet :))

rezaser74 avatar Jan 26 '23 21:01 rezaser74