Cannot read property 'installed' of undefined
johnlindquist opened this issue · 3 comments
johnlindquist commented
Trying to add vue-rx
to a TypeScript project:
Getting the following error:
vue.esm.js?ae66:4080 Uncaught TypeError: Cannot read property 'installed' of undefined
at Function.Vue.use (eval at <anonymous> (build.js:766), <anonymous>:4081:15)
at eval (eval at <anonymous> (build.js:982), <anonymous>:8:15)
at Object.<anonymous> (build.js:982)
at __webpack_require__ (build.js:658)
at fn (build.js:86)
at Object.<anonymous> (build.js:1422)
at __webpack_require__ (build.js:658)
at build.js:707
at build.js:710
main.ts
import Vue from 'vue'
import App from './components/App.vue'
import store from './store'
import Rx from 'rxjs/Rx'
import VueRx from 'vue-rx'
Vue.use(VueRx, Rx)
new Vue({
el: '#app',
store,
render: h => h(App)
})
The rest of the project: https://github.com/johnlindquist/vue-typescript-simple/tree/master/template
Any insights?
regou commented
console.log(Rx,VueRx) // undefined undefined
This works:
import Rx = require('rxjs')
import VueRx = require('vue-rx')
Vue.use(VueRx, Rx)
Not a ts expert, don't know why require
syntax works
johnlindquist commented
Thanks, that gives me a great place to start. I'll dig in some more.
…On Thu, May 4, 2017, 8:50 PM Dogeek ***@***.***> wrote:
console.log(Rx,VueRx) // undefined undefined
This works:
import Rx = require('rxjs')import VueRx = require('vue-rx')Vue.use(VueRx, Rx)
Not a ts expert, don't know why require works
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#40 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACM6UrFSfpxe0xtuR5bCEeaJRceMpXEks5r2o6AgaJpZM4NRWFz>
.
johnlindquist commented
I'm pretty sure I'm running into this: rollup/rollup#1156 (comment)
Closing for now since import * as VueRx
solves it.