lrembacz / vue-responsive-grid-layout

Vue Repsonsive Grid Layout
MIT License
83 stars 19 forks source link

Vue Warning Messages #40

Closed zubalea closed 4 years ago

zubalea commented 4 years ago

Sharing because it may help others.

Was getting the following error messages: [Vue warn]: Injection "eventBus" not found [Vue warn]: $attrs is readonly. [Vue warn]: $listeners is readonly.

Webpack Config issue:

Fix:
Add this to vue.config.js in the chainWebpack section

// before the module.exports command make sure to load path.
const path = require('path')

chainWebpack(config) {
    config.resolve.alias.set(
      'vue$',
      path.resolve(__dirname, 'node_modules/vue/dist/vue.esm.js')
    )
}

If you use webpack.config directly the format is as follows:

// note this one is untested for me.   Can't confirm the path.
module.exports = {
  //...
  resolve: {
    alias: {
      'vue$': 'vue/dist/vue.runtime.esm.js'
    }
  }

}

lrembacz commented 4 years ago

Yes, it is probably about version missmatch. I'll try to handle this in next version - https://github.com/lrembacz/vue-responsive-grid-layout/pull/41.