5

I've installed jQuery and jQuery UI with npm. Upon attempting to require('jquery-ui/ui/widgets/selectable') in one of my own JS modules, I get the following error message:

TypeError: base is not a constructor (widget.js:108)

What am I missing?

1
  • Also had this problem with jQRangeSlider 5.5.0. Your solution works :) Commented Jan 31, 2019 at 22:42

1 Answer 1

7

To solve the issue, I also had to require('jquery-ui/ui/widgets/mouse') which is a dependency for selectable but not loaded automatically when requiring the latter.

Sign up to request clarification or add additional context in comments.

2 Comments

And the same thing with yarn!
I just ran into this and needed import "jquery-ui/ui/widget" and import "jquery-ui/ui/widgets/mouse" before import "jquery-ui"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.