Running angular2 AOT and getting implicitly errors

HappyCoder

So I am trying out the AOT in angular-cli and am stumped by the following output when I run:

node_modules/.bin/ngc -p tsconfig-aot.json

Error:

> app/service/login.service.ts:14:51: Parameter 'fulfill' implicitly has
> an 'any' type. /app/service/login.service.ts:14:60: Parameter 'reject'
> implicitly has an 'any' app.component.ts:74:5: Member 'isLoggedIn'
> implicitly has an 'any' type.

Any idea what would cause this and how to fix it?

Details:

@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: darwin x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/compiler-cli: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/platform-server: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.0
MacBook-Pro-2:www-fairplay bjnash$ tsc -v
Version 2.2.1Version 2.2.1
dlcardozo

app/service/login.service.ts:14:51: Parameter 'fulfill' implicitly has an 'any' type. /app/service/login.service.ts:14:60: Parameter 'reject' implicitly has an 'any' app.component.ts:74:5: Member 'isLoggedIn' implicitly has an 'any' type.

Just add a :any to those vars.

login.service.ts replace fulfill declaration to fulfill: any, reject for reject: any.

app.component.ts replace isLoggedIn declaration for isLoggedIn: any.

Also if you want to leave all as you have it, check your tsconfig-aot.json

Find this line, it should be set to false

"noImplicitAny": true

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

.sh not running and getting no errors

From Dev

Errors when attempting to compile AoT in Angular 4

From Java

Getting the null injector errors while running ng test in angular application

From Dev

I'm getting errors trying to install angular2 moment

From Dev

Getting operand errors when running tax program

From Dev

i am getting errors im running on PHP

From Dev

getting errors when running "ionic serve"

From Dev

The Angular AoT build failed when running the release command in Ionic 3

From Dev

Angular2: When I use minified (.min) version of js I am getting errors

From Dev

getting error in calling a service while running angular2 unit tests with jasmine

From Dev

Xamarin - Customrenderer getting 2 errors

From Dev

Xamarin - Customrenderer getting 2 errors

From Dev

2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

From Dev

`TypeError: providers.forEach is not a function` with Angular2 in AOT build

From Dev

Angular2 AOT ngtools/webpack failed on linux

From Dev

Angular2 AOT Compilation with static external js file

From Dev

Problems getting Plunker running for Angular

From Dev

How to understand errors in my Dockerfile running Angular

From Dev

Why am i getting "Unexpected token <" errors in angular 2?

From Dev

py2app problems, getting errors

From Dev

Angular2 definition file errors

From Dev

Template Parse errors in angular2 template

From Dev

Angular2 definition file errors

From Dev

angular2/webpack template 404 errors

From Dev

AOT Angular Module

From Dev

Angular 4 AOT Compiler

From Dev

angular 5 noty and AOT

From Dev

Running Angular2 Project without Server

From Dev

Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

Related Related

  1. 1

    .sh not running and getting no errors

  2. 2

    Errors when attempting to compile AoT in Angular 4

  3. 3

    Getting the null injector errors while running ng test in angular application

  4. 4

    I'm getting errors trying to install angular2 moment

  5. 5

    Getting operand errors when running tax program

  6. 6

    i am getting errors im running on PHP

  7. 7

    getting errors when running "ionic serve"

  8. 8

    The Angular AoT build failed when running the release command in Ionic 3

  9. 9

    Angular2: When I use minified (.min) version of js I am getting errors

  10. 10

    getting error in calling a service while running angular2 unit tests with jasmine

  11. 11

    Xamarin - Customrenderer getting 2 errors

  12. 12

    Xamarin - Customrenderer getting 2 errors

  13. 13

    2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

  14. 14

    `TypeError: providers.forEach is not a function` with Angular2 in AOT build

  15. 15

    Angular2 AOT ngtools/webpack failed on linux

  16. 16

    Angular2 AOT Compilation with static external js file

  17. 17

    Problems getting Plunker running for Angular

  18. 18

    How to understand errors in my Dockerfile running Angular

  19. 19

    Why am i getting "Unexpected token <" errors in angular 2?

  20. 20

    py2app problems, getting errors

  21. 21

    Angular2 definition file errors

  22. 22

    Template Parse errors in angular2 template

  23. 23

    Angular2 definition file errors

  24. 24

    angular2/webpack template 404 errors

  25. 25

    AOT Angular Module

  26. 26

    Angular 4 AOT Compiler

  27. 27

    angular 5 noty and AOT

  28. 28

    Running Angular2 Project without Server

  29. 29

    Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

HotTag

Archive