You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can not build a project with the component!
When I build that ng build --prod I have the error in a browser's console:
Uncaught Error: StaticInjectorError[function (){}]: StaticInjectorError[function (){}]: NullInjectorError: No provider for function (){}! at e.get (main.a8cc9c5b546e8168adc3.bundle.js:1) at main.a8cc9c5b546e8168adc3.bundle.js:1 at g (main.a8cc9c5b546e8168adc3.bundle.js:1) at e.get (main.a8cc9c5b546e8168adc3.bundle.js:1) at main.a8cc9c5b546e8168adc3.bundle.js:1 at g (main.a8cc9c5b546e8168adc3.bundle.js:1) at e.get (main.a8cc9c5b546e8168adc3.bundle.js:1) at gt (main.a8cc9c5b546e8168adc3.bundle.js:1) at main.a8cc9c5b546e8168adc3.bundle.js:1 at vt (main.a8cc9c5b546e8168adc3.bundle.js:1)
Detail info about the problem
Build with --aot:
$ ng serve --aot** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **Date: 2017-12-18T15:49:11.559Z Hash: bc504e54a57fdb5a1683Time: 48230mschunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]chunk {main} main.bundle.js (main) 5.3 MB [initial] [rendered]chunk {polyfills} polyfills.bundle.js (polyfills) 1.14 MB [initial] [rendered]chunk {styles} styles.bundle.js (styles) 915 kB [initial] [rendered]chunk {vendor} vendor.bundle.js (vendor) 28.5 MB [initial] [rendered]webpack: Compiled successfully.
Catch the error in a browser:
Uncaught Error: StaticInjectorError[CacheStorageAbstract]: StaticInjectorError[CacheStorageAbstract]: NullInjectorError: No provider for CacheStorageAbstract! at _NullInjector.get (core.js:993) at resolveToken (core.js:1281) at tryResolveToken (core.js:1223) at StaticInjector.get (core.js:1094) at resolveToken (core.js:1281) at tryResolveToken (core.js:1223) at StaticInjector.get (core.js:1094) at resolveNgModuleDep (core.js:10878) at _createClass (core.js:10915) at _createProviderInstance$1 (core.js:10889)
@optimistex U have saved my day! After hours of scratching my head, I have found this thread.
This issue is not appearing in normal build but when AOT is set. Really appreciate it. Thank you
Can not build a project with the component!
When I build that
ng build --prod
I have the error in a browser's console:Detail info about the problem
Build with --aot:
Catch the error in a browser:
My system:
The text was updated successfully, but these errors were encountered: