Skip to content

Installing package messes with vue 3 (uncaught type error) #286

Open

Description

@timothymarois

When installing npm i -S vuedraggable@next I get uncaught type error and cant figure out why

chunk-A3UE5AZC.js?v=c5e91486:1342 Uncaught TypeError: RefImpl is not a constructor
    at createRef (chunk-A3UE5AZC.js?v=c5e91486:1342:10)
    at ref (chunk-A3UE5AZC.js?v=c5e91486:1333:10)
    at chunk-4PLQB35L.js?v=c5e91486:10349:10

I really cant figure out why this package causes it to break vue.

Tried doing import with import draggable from 'vuedraggable';

The moment I remove the dependency from package json, the error goes away.

Any guidance here?

Activity

  1. timothymarois commented on Jun 13, 2025

    @timothymarois
    Author

    I have found if I add to the vite config

    optimizeDeps: {
            include: ['vuedraggable'],
            exclude: ['vue'],
        },
    

    This solves the dup vue being added from vue draggable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions