Opened 7 years ago

Closed 7 years ago

#15015 closed bug (wontfix)

jquery-ui + browserify not work

Reported by: alexey2baranov Owned by:
Priority: minor Milestone: none
Component: ui.core Version: 1.12.0
Keywords: Cc:
Blocked by: Blocking:


jQuery 3.1.0 and jQuery UI 1.12.0 with browserify not work/ Hire is step by step instruction and github test project

  1. install jquery and jquery ui
npm install --save jquery jquery-ui

in time this report written npm insalled "jquery": "3.1.0", "jquery-ui": "1.12.0"

  1. created simple test script
window.$ = window.jQuery = require("jquery");


3.compile them with browserify

browserify --debug index.js -o dist/index.js
  1. loaded browserify result into test html page
    <script src="dist/index.js"></script>

<div id="qwerty" style="position: absolute; width: 100px;  height: 100px; background-color: #0b3e6f">123</div>

finally we should get draggable div. But insted got this error in chrome console

jQuery.Deferred exception: $(...).draggable is not a function TypeError: $(...).draggable is not a function at HTMLDocument. undefined index.js [sm]:10Uncaught TypeError: $(...).draggable is not a function

any other jquery UI widget get the same error so this is not just draggable error.

i create simple test app as written above to demonstrate my problem

Change History (2)

comment:1 Changed 7 years ago by Jörn Zaefferer

This is a problem with browserify (it works fine with webpack: ). For browserify, you need to use the deamdify plugin, but that is buggy: There's a recent PR for that issue, might be worth testing or helping to finish that:

comment:2 Changed 7 years ago by Jörn Zaefferer

Resolution: wontfix
Status: newclosed

Since this is a browserify/deamdify issue, I'm closing this. We've got for documenting the issue and how to solve it with webpack.

Note: See TracTickets for help on using tickets.