Closed efriandika closed 7 years ago
when I add https://github.com/malsup/form/ to the custom js. I got some error like this:
https://github.com/malsup/form/
GET http://localhost:8000/theme/backoffice/js/amd/pixeladmin/plugins/px-sparkline.js [HTTP/1.1 200 OK 1ms] GET http://localhost:8000/theme/backoffice/js/amd/libs/jquery.sparkline.js [HTTP/1.1 200 OK 1ms] Error: jquery.sparkline.js required. Stack trace: l<@http://localhost:8000/theme/backoffice/js/amd/pixeladmin/plugins/px-sparkline.js:1:863 @http://localhost:8000/theme/backoffice/js/amd/pixeladmin/plugins/px-sparkline.js:1:826 newContext/q.execCb@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12776 newContext/v.prototype.check@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:6466 newContext/v.prototype.enable/</<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9041 bind/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:759 newContext/v.prototype.emit/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9507 each@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:236 newContext/v.prototype.emit@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9475 newContext/v.prototype.check@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:7182 newContext/v.prototype.enable@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9368 newContext/v.prototype.init@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:5676 h@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:4228 newContext/q.completeLoad@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12008 newContext/q.onScriptLoad@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12931 requirejs.min.js:1:6863 TypeError: $(...).pxSparkline is not a function Stack trace: @http://localhost:8000/backoffice/dashboard:294:21 newContext/q.execCb@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12776 newContext/v.prototype.check@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:6466 newContext/v.prototype.enable/</<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9041 bind/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:759 newContext/v.prototype.emit/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9507 each@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:236 newContext/v.prototype.emit@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9475 newContext/v.prototype.check@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:7182 newContext/v.prototype.enable/</<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9041 bind/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:759 newContext/v.prototype.emit/<@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9507 each@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:236 newContext/v.prototype.emit@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9475 newContext/v.prototype.check@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:7182 newContext/v.prototype.enable@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:9368 newContext/v.prototype.init@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:5676 h@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:4228 newContext/q.completeLoad@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12008 newContext/q.onScriptLoad@http://localhost:8000/theme/backoffice/js/requirejs.min.js:1:12931
I got these errors if I do direct access through the URL + Enter. However, If I use F5 (refresh), sparklines works correctly. But,
Problem solved..
jQuery form support AMD. So, I don't need to put configuration for jQuery form in amd.json. Error above will happen if I put configuration for jQeury form in amd.json
when I add
https://github.com/malsup/form/
to the custom js. I got some error like this:I got these errors if I do direct access through the URL + Enter. However, If I use F5 (refresh), sparklines works correctly. But,