Hi Elias,
i test and delete the @Injectable from this Class!
but when i do this and run my App the App is not working anymore!
and i become the following Error in the Console:
compiler.es5.js:1690 Uncaught Error: Can't resolve all parameters for
NgCartItem: (?, ?, ?, ?, ?, ?, ?, ?, ?).
at syntaxError (compiler.es5.js:1690)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getDependenciesMetadata
(compiler.es5.js:15765)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getTypeMetadata
(compiler.es5.js:15633)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getInjectableMetadata
(compiler.es5.js:15619)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getProviderMetadata
(compiler.es5.js:15910)
at compiler.es5.js:15839
at Array.forEach (<anonymous>)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getProvidersMetadata
(compiler.es5.js:15799)
at
CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata
(compiler.es5.js:15454)
at
JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules
(compiler.es5.js:26795)
syntaxError @ compiler.es5.js:1690
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getDependenciesMetadata
@ compiler.es5.js:15765
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getTypeMetadata
@ compiler.es5.js:15633
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getInjectableMetadata
@ compiler.es5.js:15619
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getProviderMetadata
@ compiler.es5.js:15910
(anonymous) @ compiler.es5.js:15839
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver._getProvidersMetadata
@ compiler.es5.js:15799
webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata
@ compiler.es5.js:15454
webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules
@ compiler.es5.js:26795
webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents
@ compiler.es5.js:26768
webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync
@ compiler.es5.js:26697
webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleWithZone
@ core.es5.js:4536
webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_.bootstrapModule
@ core.es5.js:4522
../../../../../src/main.ts @ main.ts:11
__webpack_require__ @ bootstrap 82e4e64f50fe232c6c4f:54
0 @ main.ts:11
__webpack_require__ @ bootstrap 82e4e64f50fe232c6c4f:54
webpackJsonpCallback @ bootstrap 82e4e64f50fe232c6c4f:25
(anonymous) @ main.bundle.js:1
Am Freitag, 18. August 2017 11:29:35 UTC+2 schrieb Bernd Wachter:
>
> Hi,
>
> I have the following Problem when i Build my Angular 4 Project for
> Production --prod
>
> I become always the following Error when i Build with ng build --prod
> ------------------------
>
> ERROR in Can't resolve all parameters for NgCartItem in
> /Users/Benny/Projekte/ShopApp/src/app/ngcart/ngcartitem.ts: (?, ?, ?, ?, ?,
> ?, ?, ?, ?).
> ERROR in ./src/main.ts
> Module not found: Error: Can't resolve
> './$$_gendir/app/app.module.ngfactory' in
> '/Users/Benny/Projekte/ShopApp/src'
> resolve './$$_gendir/app/app.module.ngfactory' in
> '/Users/Benny/Projekte/ShopApp/src'
> using description file: /Users/Benny/Projekte/ShopApp/package.json (relative
> path: ./src)
> Field 'browser' doesn't contain a valid alias configuration
> after using description file: /Users/Benny/Projekte/ShopApp/package.json
> (relative path: ./src)
> using description file: /Users/Benny/Projekte/ShopApp/package.json
> (relative path: ./src/$$_gendir/app/app.module.ngfactory)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /Users/Benny/Projekte/ShopApp/src/$$_gendir/app/app.module.ngfactory
> doesn't exist
>
> but when i use: ng build --prod -aot=false
> then my Project Build works Ok
>
> only when i Build with ng build --prod
> then i become always this Error and my Project want not Build !
>
> have someone a Idea what is the Problem ???
>
> Thanks
> Benny
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.