{"action":"created","issue":{"url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/12","repository_url":"https://api.github.com/repos/jmdobry/CacheFactory","labels_url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/12/comments","events_url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/12/events","html_url":"https://github.com/jmdobry/CacheFactory/issues/12","id":142046394,"number":12,"title":"TypeError: CacheFactory.createCache is not a function && angular 2 integration problem  \"task is undefined\"","user":{"login":"Jacke","id":485466,"avatar_url":"https://avatars.githubusercontent.com/u/485466?v=3","gravatar_id":"","url":"https://api.github.com/users/Jacke","html_url":"https://github.com/Jacke","followers_url":"https://api.github.com/users/Jacke/followers","following_url":"https://api.github.com/users/Jacke/following{/other_user}","gists_url":"https://api.github.com/users/Jacke/gists{/gist_id}","starred_url":"https://api.github.com/users/Jacke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jacke/subscriptions","organizations_url":"https://api.github.com/users/Jacke/orgs","repos_url":"https://api.github.com/users/Jacke/repos","events_url":"https://api.github.com/users/Jacke/events{/privacy}","received_events_url":"https://api.github.com/users/Jacke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-19T09:31:02Z","updated_at":"2016-03-19T15:15:11Z","closed_at":null,"body":"Hello. I've got this error on https://github.com/jmdobry/CacheFactory/tree/master/build_examples\r\n```\r\nstan@rapture:~/Dev/CacheFactory/build_examples/browserify$ npm -v\r\n3.7.3\r\nstan@rapture:~/Dev/CacheFactory/build_examples/browserify$ node -v\r\nv5.8.0\r\n```\r\nWhat I'm doing wrong?\r\n```\r\nvar CacheFactory2 = require('../../');\r\nvar CacheFactory = require('./cachefactory.min.js');\r\nvar CacheFactory3 = require('./cachefactory.js');\r\n\r\nconsole.log(CacheFactory2);\r\nconsole.log(CacheFactory);\r\nconsole.log(CacheFactory3);\r\n\r\n\r\nvar testCache2 = CacheFactory.createCache('test');\r\nconsole.log(testCache2);\r\nvar testCache = CacheFactory3.createCache('test');\r\n\r\n\r\n\r\nObject { entry: \"./app.js\", output: Object, resolve: Object } bundle.js:52:2\r\nfunction c() bundle.js:53:2\r\nObject { entry: \"./app.js\", output: Object, resolve: Object } bundle.js:54:2\r\nObject { $$id: \"test\", destroy: a/$[e].destroy(), disable: a/$[e].disable(), enable: a/$[e].enable(), get: a/$[e].get(), info: a/$[e].info(), keys: a/$[e].keys(), keySet: a/$[e].keySet(), put: a/$[e].put(), remove: a/$[e].remove(), 24 more… } bundle.js:58:2\r\n\r\nTypeError: CacheFactory3.createCache is not a function\r\n\r\n```\r\n\r\nBut when i'm import min version all works fine.\r\n\r\n\r\nI'm also have trouble with integration with angular 2\r\n\r\n```\r\nEXCEPTION: Error during instantiation of AppComponent!. angular2.js:23730:9\r\n\r\nORIGINAL EXCEPTION: TypeError: task is undefined angular2.js:23730:9\r\n\r\nORIGINAL STACKTRACE: angular2.js:23730:9\r\n\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n angular2.js:23730:9\r\n\r\nERROR CONTEXT: angular2.js:23730:9\r\n\r\nObject { element: <sd-app>, componentElement: null, injector: Object } angular2.js:23730:9\r\n\r\nEXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object] angular2.js:23740\r\nEXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object] angular2.js:23730:9\r\n\r\nSTACKTRACE: angular2.js:23730:9\r\n\r\nresolvePromise@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:534:32\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:570:18\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n angular2.js:23730:9\r\n\r\nUnhandled Promise rejection: EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object] ; Zone: angular ; Task: Promise.then ; Value: Object { _wrapperMessage: \"DI Exception\", _originalException: TypeError, _originalStack: \"patchTimer/clearNative</<@http://lo…\", _context: null, _wrapperStack: \"WrappedException@http://localhost:8…\", keys: Array[1], injectors: Array[1], stack: \"\" } angular2-polyfills.js:460:14\r\n\r\nError: Uncaught (in promise): EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object]\r\nStack trace:\r\nresolvePromise@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:534:32\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:570:18\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n angular2-polyfills.js:462:10\r\n\r\nUnhandled Promise rejection: EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object] ; Zone: <root> ; Task: Promise.then ; Value: Object { _wrapperMessage: \"DI Exception\", _originalException: TypeError, _originalStack: \"patchTimer/clearNative</<@http://lo…\", _context: null, _wrapperStack: \"WrappedException@http://localhost:8…\", keys: Array[1], injectors: Array[1], stack: \"\" } angular2-polyfills.js:460:14\r\n\r\nError: Uncaught (in promise): EXCEPTION: Error during instantiation of AppComponent!.\r\nORIGINAL EXCEPTION: TypeError: task is undefined\r\nORIGINAL STACKTRACE:\r\npatchTimer/clearNative</<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:142:10\r\nclearInterval@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575 line 953 > Function:1:40\r\na/$[e].setRecycleFreq@http://localhost:8080/my-app/app/components/cachefactory.js:1:9453\r\na/$[e].setOptions@http://localhost:8080/my-app/app/components/cachefactory.js:1:8475\r\na@http://localhost:8080/my-app/app/components/cachefactory.js:1:11587\r\nAppComponent@http://localhost:8080/my-app/app/components/app.component.js:22:25\r\nReflectionCapabilities</ReflectionCapabilities.prototype.factory/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:1519:20\r\nInjector</Injector.prototype._instantiate@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11127:19\r\nInjector</Injector.prototype._instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11069:16\r\nInjector</Injector.prototype._new@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:11059:14\r\nInjectorInlineStrategy</InjectorInlineStrategy.prototype.instantiateProvider@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:10823:14\r\nElementDirectiveInlineStrategy</ElementDirectiveInlineStrategy.prototype.init@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8923:18\r\nAppElement@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:8613:9\r\nviewFactory_HostAppComponent0@viewFactory_HostAppComponent:71:31\r\nAppViewManager_</AppViewManager_.prototype.createRootHostView@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:6701:18\r\nDynamicComponentLoader_</DynamicComponentLoader_.prototype.loadAsRoot/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:12388:27\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:322:20\r\nNgZoneImpl/this.inner<.onInvoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2216:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:321:20\r\nZone</Zone</Zone.prototype.run@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:218:25\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:53\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nNgZoneImpl/this.inner<.onInvokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2.js?1458383153576:2208:22\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:354:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n\r\nERROR CONTEXT:\r\n[object Object]\r\nStack trace:\r\nresolvePromise@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:534:32\r\nresolvePromise@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:519:18\r\nscheduleResolveOrReject/<@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:567:18\r\nZone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:355:24\r\nZone</Zone</Zone.prototype.runTask@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:254:29\r\ndrainMicroTaskQueue@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:473:26\r\nZoneTask/this.invoke@http://localhost:8080/my-app/node_modules/angular2/bundles/angular2-polyfills.js?1458383153575:425:22\r\n angular2-polyfills.js:462:10\r\n```\r\nI'm not sure maybe it's related because only way to import cachefactory is\r\n```\r\nvar CacheFactory = require('./cachefactory.js');\r\n```\r\n```\r\nimport {CacheFactory} from 'cachefactory';\r\n```\r\nreturn undefined\r\n"},"comment":{"url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/comments/198719502","html_url":"https://github.com/jmdobry/CacheFactory/issues/12#issuecomment-198719502","issue_url":"https://api.github.com/repos/jmdobry/CacheFactory/issues/12","id":198719502,"user":{"login":"Jacke","id":485466,"avatar_url":"https://avatars.githubusercontent.com/u/485466?v=3","gravatar_id":"","url":"https://api.github.com/users/Jacke","html_url":"https://github.com/Jacke","followers_url":"https://api.github.com/users/Jacke/followers","following_url":"https://api.github.com/users/Jacke/following{/other_user}","gists_url":"https://api.github.com/users/Jacke/gists{/gist_id}","starred_url":"https://api.github.com/users/Jacke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jacke/subscriptions","organizations_url":"https://api.github.com/users/Jacke/orgs","repos_url":"https://api.github.com/users/Jacke/repos","events_url":"https://api.github.com/users/Jacke/events{/privacy}","received_events_url":"https://api.github.com/users/Jacke/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T15:15:10Z","updated_at":"2016-03-19T15:15:10Z","body":"Here is fixed version(lol i've just commended all async function like setInterval)\r\nhttps://gist.github.com/Jacke/356225bc82a51e59e203\r\nAnd it's works"}}