Error at --prod after upgrade to angular 4.0.0


#1

ionic cordova:build ios --prod --release
Running app-scripts build: --prod --iscordovaserve --nobrowser
[14:48:13] build prod started …
[14:48:13] clean started …
[14:48:13] clean finished in less than 1 ms
[14:48:13] copy started …
[14:48:13] ngc started …
{ Error: Error encountered resolving symbol values statically. Calling function ‘makeDecorator’, function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /Users/macbook/IOS/PremoveExpert/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in /Users/macbook/IOS/PremoveExpert/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in /Users/macbook/IOS/PremoveExpert/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/opaque_token.d.ts
at syntaxError (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:1513:34)
at simplifyInContext (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:23316:23)
at StaticReflector.simplify (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:23328:13)
at StaticReflector.annotations (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:22794:60)
at NgModuleResolver.resolve (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:13352:70)
at CompileMetadataResolver.getNgModuleMetadata (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:13937:60)
at addNgModule (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:22526:58)
at /Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:22537:14
at Array.forEach (native)
at _createNgModules (/Users/macbook/IOS/PremoveExpert/node_modules/@angular/compiler/bundles/compiler.umd.js:22536:26) hasBeenLogged: undefined, isFatal: undefined, name: ‘Error’ }

node modules manipulations not fix problem. If remove --prod, it builds


#2

Was it working in Angular2 with AOT/–prod Mode? Can you narrow it down to a line number in your code?


#3

Upgrade @ionic/cloud-angular

"@ionic/cloud-angular": "0.12.0"

#4

Sure! You helped me, Thanks!


#5

Yes!
"@ionic/cloud-angular": “0.12.0”

Worked for me also!. Thanks a lot