hilongjw / vue-lazyload

A Vue.js plugin for lazyload your Image or Component in your application.
http://hilongjw.github.io/vue-lazyload/
MIT License
7.99k stars 865 forks source link

Warnings in Vue 2.6.12 #496

Closed pedrosimao closed 2 years ago

pedrosimao commented 2 years ago

I am trying to use this library with Vue2 and I am getting the following warnings:

 WARNING  Compiled with 9 warnings                                                                                                                                           8:14:28 PM

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'computed' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'createVNode' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'defineComponent' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'nextTick' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'onMounted' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'onUnmounted' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'reactive' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'ref' was not found in 'vue'

 warning  in ./node_modules/vue-lazyload/vue-lazyload.esm.js

"export 'watch' was not found in 'vue'
pedrosimao commented 2 years ago

For some reason npm had installed the 3.0 version... Issue resolved by changing the lib version.

truelightn commented 1 year ago

@pedrosimao I have the same problem. Can you give me details on how to solve it?

├── vue-lazyload@3.0.0-rc.2

What version did you change and how?

pedrosimao commented 1 year ago

@truelightn manually change the library version on package.json file. and then do npm i or yarn...

truelightn commented 1 year ago

@pedrosimao Thank you!! I resolve this issue!!

npm i vue-lazyload@1.3.4

Sogl commented 1 year ago

Thx! Works for me with yarn add vue-lazyload@1.3.5 -D