Skip to content

Vue Warning Messages #40

@zubalea

Description

@zubalea

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'
    }
  }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions