Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AngularCLI build with Ivy enabled fails on --prod flag build #3762

Closed
willkara opened this issue Jul 30, 2019 · 7 comments
Closed

AngularCLI build with Ivy enabled fails on --prod flag build #3762

willkara opened this issue Jul 30, 2019 · 7 comments
Assignees
Labels
Angular Related to Angular 2+ feature-request Request a new feature

Comments

@willkara
Copy link

willkara commented Jul 30, 2019

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

=

@willkara willkara changed the title AngularCLI build with Ivy enabled AngularCLI build with Ivy enabled fails on --prod flag build Jul 30, 2019
@haverchuck
Copy link
Contributor

@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.

@willkara
Copy link
Author

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

@sammartinez sammartinez added Angular Related to Angular 2+ to-be-reproduced Used in order for Amplify to reproduce said issue pending-close-response-required and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels Jul 30, 2019
@haverchuck
Copy link
Contributor

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

@haverchuck haverchuck added the feature-request Request a new feature label Aug 2, 2019
@willkara
Copy link
Author

willkara commented Aug 2, 2019 via email

@cjardine
Copy link

@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 :)

@ericclemmons ericclemmons added this to the Angular 9 (Ivy) Support milestone Feb 10, 2020
@wickstargazer
Copy link

wickstargazer commented Mar 29, 2020

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

@tannerabread
Copy link
Contributor

Closing as the package aws-amplify-angular is now deprecated and the UI team has fixed this issue with the new angular authenticator component. Please see this comment detailing next steps if you are still facing this issue

@tannerabread tannerabread self-assigned this Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Angular Related to Angular 2+ feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

7 participants