paulvanbladel / aurelia-auth-sample

Sample for aurelia-auth
40 stars 20 forks source link

DI error when starting sample app (shim.min.js) #10

Closed pedu1 closed 8 years ago

pedu1 commented 8 years ago

When starting the app I just got this error message (followed your instructions how to set up this sample):

Unhandled promise rejection Error: Error invoking App. Check the inner error for details.

inner error: Error: key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI? at Container.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:426:15) at Object.invoke (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:315:81) at Container.invoke (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:512:31) at StrategyResolver.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:155:37) at Container.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:447:23) at http://localhost:4000/jspm_packages/github/aurelia/templating@0.16.0/aurelia-templating.js:3627:75 at f (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1415:56) at http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1423:13 at b.exports (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:453:24) at b.(anonymous function) (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1625:11) at Container.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:426:15) at Object.invoke (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:315:81) at Container.invoke (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:512:31) at StrategyResolver.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:155:37) at Container.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:447:23) at http://localhost:4000/jspm_packages/github/aurelia/templating@0.16.0/aurelia-templating.js:3627:75 at f (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1415:56) at http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1423:13 at b.exports (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:453:24) at b.(anonymous function) (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1625:11) at new AggregateError (http://localhost:4000/jspm_packages/github/aurelia/pal@0.2.0/aurelia-pal.js:20:13) at Container.invoke (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:514:15) at StrategyResolver.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:155:37) at Container.get (http://localhost:4000/jspm_packages/github/aurelia/dependency-injection@0.11.2/aurelia-dependency-injection.js:447:23) at http://localhost:4000/jspm_packages/github/aurelia/templating@0.16.0/aurelia-templating.js:3627:75 at f (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1415:56) at http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1423:13 at b.exports (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:453:24) at b.(anonymous function) (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1625:11) at Number.f (http://localhost:4000/jspm_packages/npm/core-js@0.9.18/client/shim.min.js:1596:24)(anonymous function) @ shim.min.js:1444b.exports @ shim.min.js:453b.(anonymous function) @ shim.min.js:1625f @ shim.min.js:1596q @ shim.min.js:1600

estrica2000 commented 8 years ago

add exactly the same issue has above! any clue what's happening?

jchukwum commented 8 years ago

I found a workaround for this. Do the following:

  1. open the file client/src/app.js
  2. Uncomment the line 8, and comment out line 9. The two lines should look like this after you've finished:

import FetchConfig from 'aurelia-auth/app.fetch-httpClient.config'; //import {FetchConfig} from 'aurelia-auth';

Hope it helps. John

estrica2000 commented 8 years ago

Thank you! yes that fixed it !

doktordirk commented 8 years ago

tx

apoliveira commented 8 years ago

I'm having this same issue. I notice it works for aurelia-auth version 10.2, but not the latest one. Has there been any progress?