Skip to content

ng build --prod error, Can't resolve all parameters for AppService #11686

@Walk4Muscle

Description

@Walk4Muscle

Versions

node 9.10.0
npm 5.8.0
Angular 6.0.6
Win 10

My project works fine on dev env, and also works fine when I run ng build. However, it always throws error: ERROR in : Can't resolve all parameters for AppService in <project>/src/app/services/app.service.ts: ([object Object], ?). when I run ng build --prod or ng build --aot.

I haven't comment import 'core-js/es7/reflect'; in polyfills.ts.

My app serivce code snippet is in https://stackblitz.com/edit/angular-qjuxrb?file=src%2Fapp%2Fapp.service.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions