angular-cli: AOT build broken after update to v4

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0 node: 7.1.0 os: win32 x64 @angular/common: 4.0.0 @angular/compiler: 4.0.0 @angular/core: 4.0.0 @angular/forms: 4.0.0 @angular/http: 4.0.0 @angular/platform-browser: 4.0.0 @angular/platform-browser-dynamic: 4.0.0 @angular/router: 4.0.0 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.0

package.json:

{
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "ng e2e",
    "test.coverage": "ng test --code-coverage --single-run"
  },
  "private": true,
  "license": "UNLICENSED",
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@angular/router": "4.0.0"
    "angular2-jwt": "0.1.28",
    "angular2-materialize": "6.7.2",
    "bootstrap": "3.3.7",
    "core-js": "2.4.1",
    "jquery": "3.2.1",
    "jsnlog": "2.22.1",
    "lodash": "4.17.4",
    "materialize-css": "0.98.0",
    "ng2-bs3-modal": "0.10.4",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.2.0",
    "zone.js": "0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/jsnlog": "2.17.33",
    "@types/lodash": "4.14.55",
    "@types/node": "7.0.8",
    "blob-polyfill": "1.0.20150320",
    "codelyzer": "2.0.1",
    "jasmine-core": "2.5.2",
    "jasmine-reporters": "2.2.1",
    "jasmine-spec-reporter": "3.2.0",
    "karma": "1.5.0",
    "karma-chrome-launcher": "2.0.0",
    "karma-coverage": "1.1.1",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "karma-junit-reporter": "1.2.0",
    "karma-coverage-istanbul-reporter": "1.0.0",
    "karma-remap-istanbul": "0.6.0",
    "protractor": "5.1.1",
    "sync-exec": "0.6.2",
    "ts-node": "3.0.0",
    "tslint": "4.5.1",
    "typescript": "2.2.1"
  }
}

Repro steps.

ng build -prod

The log given by the failure.

C:\work\git\bcm\bcm-webfrontend>ng build -prod
Hash: 27cc5b4b00deeeca54ac
Time: 64284ms
chunk    {0} 0.6cc43a7a9d7575bd3a5c.chunk.js 340 kB {1} {2} {3} {4} {6} [rendered]
chunk    {1} 1.ea9f1c9a3092086a9814.chunk.js 310 kB {0} {2} {3} {4} {6} [rendered]
chunk    {2} 2.480ee0d5ab0def742e6e.chunk.js 202 kB {0} {1} {3} {4} {6} [rendered]
chunk    {3} 3.b88833d0db40b5345333.chunk.js 111 kB {0} {1} {2} {4} {6} [rendered]
chunk    {4} 4.92817ddf4553c797ad31.chunk.js 24 kB {0} {1} {2} {3} {6} [rendered]
chunk    {5} polyfills.89ebf76438df8bd192bb.bundle.js (polyfills) 242 kB {10} [initial] [rendered]
chunk    {6} main.f91aeaa7d15f943c98d8.bundle.js (main) 580 kB {9} [initial] [rendered]
chunk    {7} scripts.14da069587b9dbbf7ab8.bundle.js (scripts) 588 kB {10} [initial] [rendered]
chunk    {8} styles.a6a49fb046e3800f8a30.bundle.css (styles) 440 bytes {10} [initial] [rendered]
chunk    {9} vendor.3aff78d4b4b99ad571d2.bundle.js (vendor) 2.53 MB [initial] [rendered]
chunk   {10} inline.c3759df51c430577157a.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in C:/<blabla>/src/$$_gendir/app/app.module.ngfactory.ts (1,1): Supplied parameters do not match any signature of call target.

ERROR in C:/<blabla>/src/$$_gendir/app/app.module.ngfactory.ts (1,1): Supplied parameters do not match any signature of call target.

Desired functionality.

successful production build

Mention any other details that might be useful.

error occured after upgrading from latest rc to final version (v4)

I already read some posts about problems with the aot build after upgrade, and I also had to fix some issues, even with non matching method signatures, but then, there always was a - to me, meaningful - error message mentioning the occurance in the code. But with the error message from above, I already spent hours trying to find anything that could help me and I’m really not lucky 😦 I’d be thankful for any hint on how to further dig into this and isolate the problem.

Kind regards, Marc

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17

Most upvoted comments

@mwaltersva The problem is this one:

ERROR in C:/<blabla>/src/$$_gendir/app/app.module.ngfactory.ts (1,1): Supplied parameters do not match any signature of call target.

Not showing any hint where the issue is

I also have this issue. I understand that my files probably contain errors such as function calls with arguments that don’t match the signature. However, that is still valid JavaScript. It works just fine when AoT is disabled so why are my AoT builds breaking?

/edit Most of the errors that I get are broken bindings. For example: [(ngModel)]="nonExistentProperty". I don’t blame the AoT compiler for complaining but it’s crazy that these errors are not reported right until I try to put the app in production.

I had a similar issue. I was passing a parameter to a function that did not take any arguments. For example, removing $event fixed my issue:

<button (click)="onClick($event)></button>
...

public onClick(): void {
  ...
}