Vue-js-modal: Nuxtjs - ReferenceError: window is not defined

Created on 10 Jul 2020  路  1Comment  路  Source: euvl/vue-js-modal

This is a duplicate, and I know this but the problem is still here. I have tried everything in the previous issue
I am using version ^2.0.0-rc.5

Problem:

When I run npm run dev It outputs ReferenceError: window is not defined at node_modules\vue-js-modal\dist\index.js.

Thanks,
Jacob

This is not on stackoverflow

bug

Most helpful comment

for ssr you need to use ssr files (ssr.nocss/styles.css, for example)

import VModal from 'vue-js-modal/dist/ssr.nocss'

import 'vue-js-modal/dist/styles.css'

Seems your error happened in index.js which def. would not work in ssr env

>All comments

for ssr you need to use ssr files (ssr.nocss/styles.css, for example)

import VModal from 'vue-js-modal/dist/ssr.nocss'

import 'vue-js-modal/dist/styles.css'

Seems your error happened in index.js which def. would not work in ssr env

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alex3683 picture alex3683  路  4Comments

a3020 picture a3020  路  5Comments

vesper8 picture vesper8  路  3Comments

ar53n picture ar53n  路  4Comments

outOFFspace picture outOFFspace  路  4Comments