0
votes

I am using nuxt js. I am trying to install a vue package vue-zoom. Actually few more plugins.

{ src: '~/plugins/zoom', ssr: false },

Here I kept ssr false because it gives errors like document is not defined...

In my plugins/zoom.js file I have this

import Vue from 'vue';
import vZoom from 'vue-zoom'
Vue.use(vZoom);

Now when I am trying to use this plugin like this

<v-zoom :img="`/uploads/${displayImg}`" ></v-zoom>

It gives me the above error. Any reason or thought how can I use this plugin or similar in nuxt js?

I tried few more all gives similar errors.

Thank you

1

1 Answers

1
votes

I got the same error when having the buildDir set to my functions/.nuxt folder, which I was using for SSR via Firebase Functions. I was able to solve the issue by making sure neither nuxt nor vue was installed in the node_modules inside the functions folder.

Are you using a similar setup by chance?