Home

Issue: 1496

vue-fullpage window is not defined

[issue link]

I can not connect the plugin vue-fullpage https://github.com/river-lee/vue-fullpage .

Error:

GET http://localhost:3000/ 500 (window is not defined)

node_modules\fullpage-vue\dist\fullpage.js
}
});
}
};

if (window.Vue) {
window.VueFullpage = fullpage;
Vue.use(fullpage);
}

return fullpage;


my nuxt.config.js:

modules: [
    '@nuxtjs/bootstrap-vue',
    '@nuxtjs/apollo'
  ],
  apollo: {
    networkInterfaces: {
      default: '~/apollo/network-interfaces/default.js'
    }
  },
  plugins: ['~plugins/vue-scrollto.js', '~plugins/vee-validate.js', '~plugins/fullpage-vue.js'],
  /*
---------------------------------------------------------------------------------------------
<template>
        <div class="fullpage-container">
                <div class="page-home">
                        <div class="fullpage-wp" v-fullpage="opts" ref="example">
                                <div class="page">
                                        <logo  class="part-1" v-animate="{value: 'bounceInLeft'}"></logo>
                                </div>
                                <div class="page">
                                        <about class="part-2" v-animate="{value: 'bounceInRight'}"></aboute>
                                </div>
                                <div class="page">
                                       <pricelist class="part-2" v-animate="{value: 'bounceInTop'}"></pricelist>
                                </div>
                        </div>
                </div>
        </div>
</template>

<script>
import Logo from '~/components/Logo.vue'
import aboute from '~/components/Aboute.vue'
import pricelist from '~/components/Pricelist.vue'

export default {
  data () {
    return {
      opts: {
        start: 0,
        dir: 'v',
        duration: 500,
        beforeChange: function (prev, next) {
        },
        afterChange: function (prev, next) {
        }
      }
    }
  },
  method: {
    moveNext () {
      this.$tefs.example.$fullpage.moveNext()
    }
  },
  components: {
    Logo,
    aboute,
    pricelist
  }
}
</script>

Tell me what I’m doing wrong)

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