ghiscoding/aurelia-slickgrid

Adding slickgrid to cli-require that includes kendoui-bridge and materlialize-ui-bridge.

Closed this issue · 7 comments

"aurelia-slickgrid": "^2.6.0"
requirejs
ESNext,
chrome Version 72.0.3626.121
nodejs: 10.15.0
windows10

Trying to add slickgrid for a Demo/POC where I have materialize and kendoui working.
https://github.com/johntom/aurelia-cli-kendo-materialize-require
I followed the how to step guide but as soon as I add to to main.js,

 aurelia.use.plugin('aurelia-slickgrid'); 

I get

Failed to load resource: the server responded with a status of 404 (Not Found)
bluebird.core.js:1417 Unhandled rejection Error: Script error for "slickgrid/lib/jquery.event.drag-2.3.0", needed by: aurelia-slickgrid/aurelia-slickgridhttps://requirejs.org/docs/errors.html#scripterror    at makeError (http://localhost:9000/scripts/vendor-bundle.js:3980:17)    at HTMLScriptElement.onScriptError (http://localhost:9000/scripts/vendor-bundle.js:5550:36)From previous event:    at DefaultLoader.loadModule (http://localhost:9000/scripts/vendor-bundle.js:37461:12)    at _loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:27863:19)    at http://localhost:9000/scripts/vendor-bundle.js:27847:16From previous event:    at loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:27846:75)    at next (http://localhost:9000/scripts/vendor-bundle.js:28179:18)From previous event:    at next (http://localhost:9000/scripts/vendor-bundle.js:28179:54)    at http://localhost:9000/scripts/vendor-bundle.js:28187:14From previous event:    at FrameworkConfiguration.apply (http://localhost:9000/scripts/vendor-bundle.js:28171:42)    at Aurelia.start (http://localhost:9000/scripts/vendor-bundle.js:27715:37)    at Object.configure (http://localhost:9000/scripts/app-bundle.js:513:13)    at http://localhost:9000/scripts/vendor-bundle.js:26252:27From previous event:    at config (http://localhost:9000/scripts/vendor-bundle.js:26247:54)    at http://localhost:9000/scripts/vendor-bundle.js:26283:12From previous event:    at bootstrap (http://localhost:9000/scripts/vendor-bundle.js:26282:24)    at http://localhost:9000/scripts/vendor-bundle.js:26269:7From previous event:    at run (http://localhost:9000/scripts/vendor-bundle.js:26264:59)    at Object.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:26289:35)    at Object.execCb (http://localhost:9000/scripts/vendor-bundle.js:5508:33)    at Module.check (http://localhost:9000/scripts/vendor-bundle.js:4695:51)    at Module.enable (http://localhost:9000/scripts/vendor-bundle.js:4988:22)    at Object.enable (http://localhost:9000/scripts/vendor-bundle.js:5369:39)    at Module.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:4973:33)    at http://localhost:9000/scripts/vendor-bundle.js:3946:23    at each (http://localhost:9000/scripts/vendor-bundle.js:3871:31)    at Module.enable (http://localhost:9000/scripts/vendor-bundle.js:4925:17)    at Object.enable (http://localhost:9000/scripts/vendor-bundle.js:5369:39)    at Module.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:4973:33)    at http://localhost:9000/scripts/vendor-bundle.js:3946:23    at each (http://localhost:9000/scripts/vendor-bundle.js:3871:31)    at Module.enable (http://localhost:9000/scripts/vendor-bundle.js:4925:17)    at Module.init (http://localhost:9000/scripts/vendor-bundle.js:4600:26)    at http://localhost:9000/scripts/vendor-bundle.js:5272:36
printWarning @ bluebird.core.js:1417

  • What is the expected behavior?
    I would like to add it to this repo

  • What is the motivation / use case for changing the behavior?
    Like to show client comparison with kendoui grid.

While not critical as I do have slickgrid and aurelia-materialze-bridge working, I've been working with cli and would like to resolve if possible.

You're missing jQuery.event which is a dependency of SlickGrid, when using WebPack there's nothing to do since it's part of import I have inside the library itself but for the other CLI like RequireJS, you need to add them to your mapping as shown in the HOWTO - RequireJS (look closely, it is part of the howto). I have no dependency to KendoUI neither Material since the lib was made using Bootstrap (you can customize it to look like Material though). So the subject of your issue seems incorrect, I don't need these 2 dependencies at all

I know that those two libraries are not needed fpr the slickgrid plugin as I do have it working when just testing slickgrid with requirejs. I used that Title for a brief description as there seems to be a conflict when I add it to some pre-existing repos which have those plugins I'm trying to add and I carefully followed Howto and added all the code into aurelia.json including {
"name": "jquery-event",
"path": "../node_modules/slickgrid/lib",
"main": "jquery.event.drag-2.3.0"
},
Thanks for the reply and I'll press on as its not critical and I'm just tring to push my cli skills to next level. Should I resolve I will post the repo.

I understand that it seems to be more of a conflict with other libraries, there isn't much I can do on my side since I'm not using any of these libs. Please do share what you find though.

Perhaps you should try the inverse, try to get only Aurelia-Slickgrid working and then try to add Kendo UI and Materialize afterward. I don't know much about Kendo UI, but does it use any drag & drop feature? If so, it might related to the issue #48 which seem to have conflicting issues with other dragging libs.

Yes, that must be the issue, makes sense as I knew I was following instuctions. Seems like https://github.com/DimitarChristoff/slickgrid-es6 is the futre of clickgrid as I read mention of https://github.com/6pac/SlickGrid dropping out.

Just a side note, I started with Slickgrid ES6 long time ago, then finally decided to switch to 6pact/Slickgrid because the ES6 had no traction.