Amplify-js: Error when building with AOT enabled when using Angular

Created on 10 Jul 2019  路  16Comments  路  Source: aws-amplify/amplify-js

Describe the bug
I'm running a basic ng build --prod and I'm getting the following error:

ERROR in node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(7,55): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(16,11): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(46,42): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(5,81): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(27,16): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.core.d.ts.ConfirmSignInComponentCore.html(37,14): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(68,40): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(8,6): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(11,64): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(19,9): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(25,53): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(34,9): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(37,41): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(41,12): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(50,14): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.core.d.ts.ConfirmSignUpComponentCore.html(60,12): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(25,81): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(30,12): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(41,44): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(47,16): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(61,10): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(5,75): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(13,64): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(22,11): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.core.d.ts.SignInComponentCore.html(38,12): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(11,46): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(19,13): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(40,44): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(42,96): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(59,42): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(8,10): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.core.d.ts.SignUpComponentCore.html(51,12): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(40,38): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(5,84): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(9,55): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(17,7): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(26,10): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.core.d.ts.RequireNewPasswordComponentCore.html(32,10): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/greeting-component/greeting.component.core.d.ts.GreetingComponentCore.html(8,6): : Property 'amplifyService' is protected and only accessible within class 'GreetingComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(8,55): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(11,54): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(20,53): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(27,9): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(32,57): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(40,9): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(50,14): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(56,14): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(66,16): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(74,16): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(85,42): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.core.d.ts.ForgotPasswordComponentCore.html(5,81): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.core.d.ts.UsernameFieldComponentCore.html(4,61): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.core.d.ts.UsernameFieldComponentCore.html(9,13): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.core.d.ts.UsernameFieldComponentCore.html(20,64): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.core.d.ts.UsernameFieldComponentCore.html(26,13): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentCore' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.ionic.d.ts.ConfirmSignInComponentIonic.html(39,42): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.ionic.d.ts.ConfirmSignInComponentIonic.html(7,8): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.ionic.d.ts.ConfirmSignInComponentIonic.html(12,93): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-in-component/confirm-sign-in-component.ionic.d.ts.ConfirmSignInComponentIonic.html(31,10): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(80,42): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(11,8): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(16,93): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(28,94): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(49,12): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(53,40): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(59,12): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(63,40): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/confirm-sign-up-component/confirm-sign-up.component.ionic.d.ts.ConfirmSignUpComponentIonic.html(69,12): : Property 'amplifyService' is protected and only accessible within class 'ConfirmSignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(14,53): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(24,91): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(36,91): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(55,8): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(60,8): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(85,42): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(11,6): : Property 'amplifyService' is protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(63,40): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(65,59): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(69,40): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/forgot-password-component/forgot-password.component.ionic.d.ts.ForgotPasswordComponentIonic.html(75,12): : Property 'amplifyService' is
protected and only accessible within class 'ForgotPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/greeting-component/greeting.component.ionic.d.ts.GreetingComponentIonic.html(11,8): : Property 'amplifyService' is protected and only accessible within class 'GreetingComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(39,72): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(45,14): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(50,110): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(62,42): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(8,73): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(17,82): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-in-component/sign-in.component.ionic.d.ts.SignInComponentIonic.html(35,12): : Property 'amplifyService' is protected and only accessible within class 'SignInComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(15,10): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(26,11): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(56,72): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(62,14): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(72,42): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(8,73): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(47,10): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(50,42): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/sign-up-component/sign-up.component.ionic.d.ts.SignUpComponentIonic.html(52,96): : Property 'amplifyService' is protected and only accessible within class 'SignUpComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.ionic.d.ts.UsernameFieldComponentIonic.html(4,110): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.ionic.d.ts.UsernameFieldComponentIonic.html(9,13): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.ionic.d.ts.UsernameFieldComponentIonic.html(20,113): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/username-field-component/username-field.component.ionic.d.ts.UsernameFieldComponentIonic.html(25,13): : Property 'amplifyService' is protected and only accessible within class 'UsernameFieldComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.ionic.d.ts.RequireNewPasswordComponentIonic.html(11,8): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.ionic.d.ts.RequireNewPasswordComponentIonic.html(16,93): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentIonic' and its subclasses.
node_modules/aws-amplify-angular/dist/src/components/authenticator/require-new-password-component/require-new-password.component.ionic.d.ts.RequireNewPasswordComponentIonic.html(37,10): : Property 'amplifyService' is protected and only accessible within class 'RequireNewPasswordComponentIonic' and its subclasses.

I reported the problem on the Angular side and they answered

Those appear to be legitimate errors within aws-amplify-angular. Properties accessed from a template are currently required to be public.

You can see it here: https://github.com/angular/angular-cli/issues/15035

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/jeremyputeaux/angular8-amplify-aot-build-problem
  2. npm i
  3. ng build --prod

Expected behavior
I'm expecting the build to work.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 75

Additional context
I'm using Window 10 and the WSL.

Sample code
https://github.com/jeremyputeaux/angular8-amplify-aot-build-problem
You just need: npm i and ng build --prod

Angular bug

Most helpful comment

@haverchuck Yes that is correct. Disabling fullTemplateTypeCheck made it work. I can go back to the current lattest version 3.0.5.
I hope you'll find a solution soon. Thank you !

All 16 comments

Not a proper solution, but by rolling back to [email protected] instead of the latest one (v3.0.5), you should be able to workaround the changes introducing this issue.

Altho, you may be welcomed by a new error regarding AmplifyUI but maybe you'll have more luck with this one on your end ^^

@HiDeoo Thank you for your help.
I tried v3.0.3 but it did not work.

I've solved my problem by going back to v0.1.6. 馃槥

@jeremyputeaux, @HiDeoo - I think this error is caused by:

tsconfig:

  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  }

Disabling the 'fullTemplateTypeCheck' should move you forward (although ultimately this should not be necessary). I believe I know what the underlying issue is and will continue digging into it.

@haverchuck Yes that is correct. Disabling fullTemplateTypeCheck made it work. I can go back to the current lattest version 3.0.5.
I hope you'll find a solution soon. Thank you !

Great to find this tread and the solution provided by @haverchuck. I am integrated Amazon Cognito into a JHipster based Angular app. Got the plumbing in place and then hit this issue when I tried to deploy for production. Found this discussion and, 10 minutes later, I'm in business! Just disabled fullTemplateTypeCheck in tsconfig-aot.json in my case and got past the issue.

I had this problem as well, and it looks like putting "fullTemplateTypeCheck" to false in tsconfig.json also made the errors go away. Is it ok to leave it like this for production?

And any further info as to what the cause of this could be?

Disabling fullTemplateTypeCheck is an awful solution. The point of Angular + Typescript is to prevent type errors. Disabling type checking project wide because 1 lib can't fix their problems is not the right solution.

So the reason is that a protected variable is used in the template here

Is anyone working on a PR?

@pubkey Seems there is a PR pending since a few month -> https://github.com/aws-amplify/amplify-js/pull/3793

This could save time. Could someone merge it?

@hfahlbusch ah haven't seen that. Maybe we can@ someone who is able to merge this?

Did you amplify add ... using the dev environment?
and now you are trying to run ng build --prod?

Disabling fullTemplateTypeCheck is an awful solution. The point of Angular + Typescript is to prevent type errors. Disabling type checking project wide because 1 lib can't fix their problems is not the right solution.

I agree with this but can't see a workaround until the PR is merged. Did anyone come across any other solutions other than disabling fullTemplateTypeCheck?

Dropping AWS Datastore should help

The new Amplify Angular UI Authenticator support Angular 9 and AOT. I am going to close this issue now. If you are having trouble using the new UI component library or are trying to use components other than the Authenticator, please open a new issue with the details and reproduction steps.

Here is a link to the new UI documentation:
https://docs.amplify.aws/ui/q/framework/angular

@jordanranz Does that mean Amplify supports Angular 9 as well, or just Amplify Angular UI? This page still says Angular 9 is not supported.

@jordanranz surely you could approve this pr https://github.com/aws-amplify/amplify-js/pull/4883 rather than leaving the code broken?

Was this page helpful?
0 / 5 - 0 ratings