charlespockert / aurelia-bs-grid

Aurelia and Bootstrap powered datagrid control
MIT License
45 stars 21 forks source link

new installation problem #67

Open denimaaark opened 8 years ago

denimaaark commented 8 years ago

Hello, i have installed new versions of aurelia and grid.

I have errors when included plugin aurelia-bs-grid

Unhandled promise rejection Error: (0 , _aureliaFramework.skipContentProcessing) is not a function(…)(anonymous function) @ es6.promise.js:138 es6.promise.js:138 Unhandled promise rejection Error: (0 , _aureliaFramework.skipContentProcessing) is not a function(…)(anonymous function) @ es6.promise.js:138 es6.promise.js:138 Unhandled promise rejection Error: (0 , _aureliaFramework.skipContentProcessing) is not a function(…)

jmjf commented 8 years ago

Looking at this, it seems like changes from 0.0.4 vs master. I'm guessing Aurelia, being pre-beta, is evolving faster than developers can release updates to address breaking API changes.

The quick fix for this particular problem is, in package.json find the line for aurelia-bs-grid, which will look something like:

"charlespockert/aurelia-bs-grid": "github:charlespockert/aurelia-bs-grid@^0.0.4",

replace the @^0.0.4 with @master

Do the same in config.js.

This may or may not solve your problem. I'm getting a different error now that doesn't reference aurelia-bs-grid, but that goes away when I remove the .plugin() line for aurelia-bs-grid, so is obviously related to aurelia-bs-grid.

Unhandled promise rejection
Error: Error invoking TaskQueue. Check the inner error for details. ------------------------------------------------ 
inner error: 
makeRequestFlushFromMutationObserver@http://localhost:9000/jspm_packages/github/aurelia/task-queue@0.8.0/aurelia-task-queue.js:13:20 
TaskQueue@http://localhost:9000/jspm_packages/github/aurelia/task-queue@0.8.0/aurelia-task-queue.js:59:41 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:334:14 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:309:155 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:557:16 
get@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:145:27 
get@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:488:18 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:354:23 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:309:155 
invoke@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:557:16 
get@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:145:27 
get@http://localhost:9000/jspm_packages/github/aurelia/dependency-injection@0.12.0/aurelia-dependency-injection.js:488:18 
initialize@http://localhost:9000/jspm_packages/github/aurelia/templating@0.16.0/aurelia-templating.js:3109:30 
initialize@http://localhost:9000/jspm_packages/github/aurelia/templating@0.17.1/aurelia-templating.js:2337:7 
initialize@http://localhost:9000/jspm_packages/github/aurelia/templating@0.17.1/aurelia-templating.js:2256:9 
importViewResources/<@http://localhost:9000/jspm_packages/github/aurelia/templating@0.17.1/aurelia-templating.js:2617:11 
l/</h@http://localhost:9000/jspm_packages/npm/core-js@1.2.6/client/shim.min.js:1773:66 
l/<@http://localhost:9000/jspm_packages/npm/core-js@1.2.6/client/shim.min.js:1778:19 
e@http://localhost:9000/jspm_packages/npm/core-js@1.2.6/client/shim.min.js:1958:55 

I also note that when I install with jspm, aurelia-bs-grid uses different versions than the latest Aurelia skeleton, so it may be some conflict related to that. (task-queue above is 0.8.0, but skeleton 0.20.0 uses 0.9.0, so there are two different versions, possibly creating conflicts.) I'm going to try to step back to skeleton 0.19.0 and see if that resolves anything. More to come.

jmjf commented 8 years ago

Followup: Using Skeleton 0.19.0 instead of 0.20.0 looks like it will solve the problems, maybe. I'm down to an issue with aurelia-http-client:

Unhandled promise rejection
TypeError: _this.XHRType is not a constructor

It is pulling newer versions of a couple of Aurelia packages, so I'm guessing it needs to be forced to a newer version too. Or maybe swapped out for the fetch client. Hopefully, I'll get this working today.

NOTE: all the samples except remote data work fine.

After, I may try to beat together a 0.20.0 compatible branch, but want to see the unmodified code working first so I know what the issues are. Although, given official beta's impending release (according to the latest on the Aurelia blog), it may be wiser to wait until that's settled.

denimaaark commented 8 years ago

thanks for help, i have try with master but still not working ... i will wait an update ...

jmjf commented 8 years ago

After further research, aurelia-templating 0.17.0 removes viewSlot.swap(). See this blog post and this commit. Apparently, no one uses viewSlot.swap()... except aurelia-bs-grid (oops). So I copied the viewSlot.swap() code and worked it into grid.js.

Then I discovered that bindingEngine is now BindingEngine, set up to inject it, but the grids in the sample all come up blank, so I'm guessing I'm doing something wrong and don't understand what's going on well enough to untangle it.

@charlespockert: If it helps get this plugin functioning with current versions of Aurelia, you can see my work on the plugin so far at: https://github.com/jmjf/aurelia-bs-grid/tree/skeleton-0.20.0. I've also pushed the repo I've been using to test at https://github.com/jmjf/skel-0.20.0--which is navigation-skeleton 0.20.0 with the aurelia-bs-grid sample app copied to src, aurelia-http-client 0.13.0, and aurelia-bs-grid from my repo's skeleton-0.20.0 branch.

@denimaaark: Until this repo is updated, you can clone the navigation-skeleton repo, checkout 0.19.0, npm install, jspm install and jspm install github:charlespockert/aurelia-bs-grid@master and it should work. I was able to get the sample app working with those versions and aurelia-http-client@0.12.0 and a few adjustments to config.js (to add the css alias for systemjs/plugin-css@0.1.16) and main.js (adding charlespockert/ to the plugin line).

jmjf commented 8 years ago

The skeleton-0.20.0 branch of https://github.com/jmjf/aurelia-bs-grid/tree/skeleton-0.20.0 is fixed for skeleton 0.20.0, I think.

After updating the dependencies, there were three breaking API changes between skeleton 0.19.0 and 0.20.0.

I fixed the bindingEngine -> BindingEngine change noted above by injecting BindingEngine and assigning it to this.bindingEngine and replacing the one use of bindingEngine with this.bindingEngine.

I fixed the viewSlot.swap() removal by copying the code from skeleton 0.19.0 and making minor adjustments to fit the context.

The major issue turned out to be a change in the API for ViewFactory.create(). In the previous release, it accepted a bindingContext parameter. In the current release, bindingContext must be set after the view is created with view.bind(bindingContext). That is why nothing displayed in the grid container in the previous note. It works for all examples, I think.

See Pull #69 and the repo branch noted above for details.

Scary thing is, I think I'm staring to understand Babelified ES5.

charlespockert commented 8 years ago

I always look at the ES5 and not the pre-transpiled code :) - you get used to it

Thanks for the work so far!

marcoalfaro commented 7 years ago

Charles, very nice grid. Sadly it doesn't work on Aurelia 1.0.1 with installation issues Are you planning to fix it for the latest version of Aurelia?