Error in beforeCreate hook because of reference to local file
niklashof opened this issue · 1 comments
niklashof commented
The current version throws an error:
[Vue warn]: Error in beforeCreate hook: "ReferenceError: document is not defined"
This happens because there is a local file referenced:
at /Users/jjuszczak/Projekte/Privat/vue-parallax/src/components/Parallax.vue
line 3037:
beforeCreate: [_t], __file: "/Users/jjuszczak/Projekte/Privat/vue-parallax/src/components/Parallax.vue"
Environment
- vue-parallax version: 1.0.4
apertureless commented
Are you using it in a ssr environment? Like nuxt ?
You need to add it as a plugin and then disable ssr for it.
As document and window are not defined on server side.