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

Runtime error with Angular 5, TypeScript 2.7 etc #46

Open
catull opened this issue Feb 26, 2018 · 7 comments
Open

Runtime error with Angular 5, TypeScript 2.7 etc #46

catull opened this issue Feb 26, 2018 · 7 comments

Comments

@catull
Copy link
Contributor

catull commented Feb 26, 2018

I have the following dependencies:

   "dependencies": {
        "@angular/common": "^5.2.6",
        "@angular/compiler": "^5.2.6",
        "@angular/core": "^5.2.6",
        ........
        "@angular/http": "^5.2.6",
        "admin-lte": "2.3.11",
        "ngx-admin-lte": "1.0.1",
        "rxjs": "^5.5.6",
        "zone.js": "^0.8.20"
    },
    "devDependencies": {
        "@angular/cli": "^1.7.1",
        "@angular/compiler-cli": "^5.2.6",
        .........
        "tslint": "~5.9.1",
        "typescript": "^2.7.2"
    }

I have seen this error with angular 4, also with @angular/cli 1.5.x and 1.6.x.
Also, the error appeared using TypeScript 2.4, 2.5 and 2.6.

Never got around to opening an issue for the error.

So, here's the error when npm starting my angular app:

npm run start

> integrator-ui@0.0.3 start:local /Users/carlo/workspace/java/d+h/inuc/core-master.git/adapter/integrator-ui/src/main/ng
> npm run lint && ng serve --environment dev

> integrator-ui@0.0.3 lint src
> ng lint

All files pass linting.
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/integrator-ui **
Date: 2018-02-26T20:42:41.578Z
Hash: 89e43edbf054446544a5
Time: 13004ms
chunk {inline} inline.bundle.js (inline) 3.86 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 2.91 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 577 bytes [initial] [rendered]
chunk {scripts} scripts.bundle.js (scripts) 1.67 MB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 1.28 MB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 852 kB [initial] [rendered]

ERROR in node_modules/ngx-admin-lte/src/ngx-admin-lte.module.ts(14,36): error TS2345: Argument of type 'HttpClient' is not assignable to parameter of type 'HttpClient'.
  Types have separate declarations of a private property 'handler'.


webpack: Failed to compile.

The lines in question are

export function HttpLoaderFactory(httpClient: HttpClient) {
    return new TranslateHttpLoader(httpClient, 'assets/i18n/', '.json');
}
@fabioformosa
Copy link

me too

@TwanoO67
Copy link
Owner

TwanoO67 commented Mar 7, 2018

Hello guys,

To achieve that i need help on issue #47
If you have any idea it would be much appreciated

@TwanoO67
Copy link
Owner

TwanoO67 commented Mar 9, 2018

seems fixed by 2.0.0.beta-7
Can you confirm ?

@fabioformosa
Copy link

I confirm.
Don't forget to update documentation, as reported here #47 (comment), to fix assets path.
Thank you.

@catull
Copy link
Contributor Author

catull commented Mar 12, 2018

Interestingly, I never had to fiddle with the asset path configuration. Can be closed now.

@TwanoO67
Copy link
Owner

TwanoO67 commented Mar 12, 2018

Assets are needed for the translation files and for default img, like avatar.

Documentation README is up to date on the relative branche, it will appear on github page when the branch will not be beta anymore.

@catull
Copy link
Contributor Author

catull commented Mar 12, 2018

Ah, I see.
Never seen any runtime errors, because my web app does not have a need for translation or avatars.
Kind of low-key, non-social bare bootstrap with menus and buttons/links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants