jQuery-Timepicker-Addon
jQuery-Timepicker-Addon copied to clipboard
Uncaught Error: Script error for "jquery-ui", needed by: jquery_ui_timepicker_addon
trafficstars
I've specified the files needed in my require-config.js:
paths: {
jquery: "Scripts/jquery-1.9.1",
jquery_ui: "Scripts/jquery-ui",
jquery_ui_timepicker_addon: "Scripts/jquery-ui-timepicker-addon",
And in my Module.js i'm loading the files in this order:
require(["jquery", "react", "reactDom", "jquery_ui", "jquery_ui_timepicker_addon"],
function (jQuery, React, ReactDOM, jQueryUI, jQueryDateTime) {
But when I try to run this script, I get this error:
require.js: Uncaught Error: Script error for "jquery-ui", needed by: jquery_ui_timepicker_addon
I've tried adding a shim to specify that timepicker needs jquery and jquery-ui, but doesn't help.
If I check the network tab in the browser, I can find jquery-ui.js, but also a 404 on another load on jquery-ui that comes from the jquery-ui-timepicker-addon.js file.
EDIT: I've edited the path in jquery-ui-timepicker-addon.js, when it tries to find jquery-ui:
define(['jquery', 'jquery-ui'], factory);
This gives the totaly wrong path, when I edited to this:
define(['jquery', '../Scripts/jquery-ui'], factory);
It worked. But that doesn't seems like the correct way?