Skip to content

Angular CLI rc.0: ng serve -prod error #10233

Closed

Description

@yfain

Generated a new project with Angular CLI 6.0.0-rc.0 (I use MAC OS). Running ng serve works fine but running ng serve -prod returns the following error:

Schema validation failed with the following errors:
Data path "" should NOT have additional properties (p).
Error: Schema validation failed with the following errors:
Data path "" should NOT have additional properties (p).
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (/Users/yfain11/hello6rc0/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/workspace/workspace.js:145:42)
at MergeMapSubscriber._tryNext (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/operators/mergeMap.js:122:27)
at MergeMapSubscriber._next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/operators/mergeMap.js:112:18)
at MergeMapSubscriber.Subscriber.next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/Subscriber.js:103:18)
at MergeMapSubscriber.notifyNext (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/operators/mergeMap.js:141:26)
at InnerSubscriber._next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/InnerSubscriber.js:30:21)
at InnerSubscriber.Subscriber.next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/Subscriber.js:103:18)
at MapSubscriber._next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/operators/map.js:92:26)
at MapSubscriber.Subscriber.next (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/Subscriber.js:103:18)
at SwitchMapSubscriber.notifyNext (/Users/yfain11/hello6rc0/node_modules/rxjs/internal/operators/switchMap.js:122:26)

Activity

  1. julianobrasil commented on Apr 8, 2018

    @julianobrasil

    Take a look at #10231. Maybe this is related to an unsuccessful migration process too.

  2. yfain commented on Apr 8, 2018

    @yfain
    Author

    I didn't migrate any projects but generated a new one.

  3. julianobrasil commented on Apr 8, 2018

    @julianobrasil

    Oh, sorry. Another thing I've noticed in rc.* versions is that -prod doesn't work anymore when you're building. You must use --prod. It's likely the same with ng serve.

  4. tomastrajan commented on Apr 8, 2018

    @tomastrajan
    Contributor

    Have the same problem on newly generated project.

  5. julianobrasil commented on Apr 8, 2018

    @julianobrasil

    I can confirm it works if you use --prod (double dashes) instead of -prod

  6. yfain commented on Apr 8, 2018

    @yfain
    Author

    It worked with double dashes --prod but it seems that a single dash generates a stack trace in other cases as well, e.g. ng serve --prod -port 4300.

    If single dashes are not allowed anymore (why?), they shouldn't generate a stack trace but provide a more meaningful message.

  7. filipesilva commented on Apr 9, 2018

    @filipesilva
    Contributor

    We removed single dash support in 6.0 to make way for single dash to be used with multiple flags in the future (-abcd would be the same as -a -b -c -d).

    I agree using single dashes should error out with a helpful description instead of the current behaviour.

  8. clydin commented on Apr 11, 2018

    @clydin
    Member

    Error messages resolved via #10245

  9. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  10. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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