Skip to content

Install issue when VueRouter is already used on Vue #406

Closed
@kellym

Description

@kellym

Version

1.0.0-beta.11

Reproduction link

https://codesandbox.io/s/p7x5mqkx2q

Steps to reproduce

This likely applies to other libraries, but when VueRouter is already installed on Vue (i.e Vue.use(VueRouter)) and then subsequently used with localVue, it errs with

Error: [vue-router] not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance.

What is expected?

No error.

What is actually happening?

Error: [vue-router] not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance.

Adding

VueRouter.install.installed = true

after declaring a localVue instance fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions