vuejs/vue-rx

Cannot read property 'installed' of undefined

johnlindquist opened this issue · 3 comments

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

I'm pretty sure I'm running into this: rollup/rollup#1156 (comment)

Closing for now since import * as VueRx solves it.