Amplify-js: AngularCLI build with Ivy enabled fails on --prod flag build

Created on 30 Jul 2019  ·  6Comments  ·  Source: aws-amplify/amplify-js

Describe the bug
While trying to run ng build --prod on an AngularCLI project with Ivy enabled, it fails on the build

Same as #3620

To Reproduce
Steps to reproduce the behavior:

  1. Create a new AngularCLI project
  2. Enable Ivy Compiler
  3. Install amplify packages npm install aws-amplify aws-amplify-angular
  4. Run ng build --prod

I've tried getting rid of both default compilerOptions and having ONLY IvyEnabled.

Expected behavior
Build completes successfully

Screenshots

Build output

G:\Development\Personal\Wamplify>ng build --prod

chunk {0} runtime-es2015.703a23e48ad83c851e49.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es2015.efedd750490b14de3f18.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es2015.66a9e684cc8ebe117187.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} styles.766cbe8e00b1dc50cc5e.css (styles) 62.6 kB [initial] [rendered]
Date: 2019-07-30T02:51:05.574Z - Hash: 6713af75921c4be3d6d8 - Time: 9551ms

ERROR in ENOENT: no such file or directory, open 'G:/Development/Personal/Wamplify/node_modules/aws-amplify-angular/bundles/aws-amplify-angular.umd.js'

tsconfig.json

```{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"types": [
"node"
]
},
"angularCompilerOptions": {
"enableIvy": true
}
}

package.json

{
"name": "wamplify",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.1.3",
"@angular/cdk": "^8.1.2",
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/forms": "~8.1.2",
"@angular/material": "^8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"aws-amplify": "1.1.27",
"aws-amplify-angular": "^3.0.3",
"change-case": "^3.1.0",
"hammerjs": "^2.0.8",
"highlightjs": "^9.12.0",
"marked": "^0.7.0",
"moment": "^2.24.0",
"ngx-markdown": "^8.1.0",
"ngx-markdown-editor": "^2.0.0",
"rxjs": "~6.4.0",
"simplemde": "^1.11.2",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.801.2",
"@angular/cli": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^8.10.51",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
}
}
```

Desktop (please complete the following information):
Windows 10. Building in Webstorm with Node v10.15.1

=

Angular feature-request

Most helpful comment

@haverchuck Is there any progress on this? Ivy delivers some compelling performance improvements (when I remove Amplify) but I'm now having to consider moving to other serverless solutions in anticipation of Angular 9 release (Ivy on by default; now in RC). Any information either way would be helpful and appreciated :)

All 6 comments

@willkara - In the angularCompiler options, can you try setting the 'fullTemplateTypeCheck' to false? We realize this is not a true solution, but interested to know if it unblocks you for now.

@haverchuck at work now, but will check when I get home.

@willkara I don't think we are able to support Ivy yet. We will be making a note of this in our documentation.

No problem 😁 thank for checking back in.

On Fri, Aug 2, 2019, 10:52 Dustin Noyes notifications@github.com wrote:

@willkara https://github.com/willkara I don't think we are able to
support Ivy yet. We will be making a note of this in our documentation.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-amplify/amplify-js/issues/3762?email_source=notifications&email_token=AAZAQJ3CRGY7WCSLPVZ4F3DQCRCZ7A5CNFSM4IHX3JW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3N7AZQ#issuecomment-517730406,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAZAQJ7DI3L6MB3CWKAPY23QCRCZ7ANCNFSM4IHX3JWQ
.

@haverchuck Is there any progress on this? Ivy delivers some compelling performance improvements (when I remove Amplify) but I'm now having to consider moving to other serverless solutions in anticipation of Angular 9 release (Ivy on by default; now in RC). Any information either way would be helpful and appreciated :)

Hi guys, i have published @flowaccoun/aws-amplify-angular version 4.2.11

@flowaccount/aws-amplify-angular

Its working with angular 9 now, We need to use it now, so I took the liberty :)

For the official version, the below steps need to be taken with the following Pull request

  1. Update yarn version to support ivy
  2. Review the code and confirm the tests
  3. Merge the Pull Request and we can move back to the official package!

For now, anyone has a hurry or urgent need like us, please use the ‘@flowaccount/awns-amplify-angular’ :)

Cheers

Was this page helpful?
0 / 5 - 0 ratings