vue-threejs icon indicating copy to clipboard operation
vue-threejs copied to clipboard

Cannot read property install of undefined

Open rafinskipg opened this issue 6 years ago • 2 comments

vue.runtime.esm.js?2b0e:4998 Uncaught TypeError: Cannot read property 'install' of undefined
    at Function.Vue.use (vue.runtime.esm.js?2b0e:4998)
    at createApp (app.js?1112:7)
    at eval (entry-client.js?a949:3)
    at Module../src/entry-client.js (main.js:2806)
    at __webpack_require__ (main.js:724)
    at fn (main.js:101)
    at Object.0 (main.js:2951)
    at __webpack_require__ (main.js:724)
    at main.js:791
    at main.js:794

VERSION: "vue": "^2.5.22", "vue-router": "^3.0.2", "vue-server-renderer": "^2.6.3", "vue-threejs": "^0.2.0-alpha.1"

Followed the documentation,

  Vue.use(VueThreejs)

  const router = createRouter()

  const app = new Vue({
    router,
    render: h => h(App)
  })

It does not work

rafinskipg avatar Feb 12 '19 13:02 rafinskipg

https://github.com/fritx/vue-threejs/blob/dev/examples/main.js#L6-L9

@rafinskipg sorry for the outdated documentation.

After upgrated to vue-cli-3, aka 0.2.0-alpha, it should be changed to

import * as VueThreejs from 'vue-threejs'
Vue.use(VueThreejs)

fritx avatar Feb 13 '19 04:02 fritx

This works as expected! We can close this issue!

anandbhaskaran avatar Aug 26 '19 12:08 anandbhaskaran