You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
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.
Activity
julianobrasil commentedon Apr 8, 2018
Take a look at #10231. Maybe this is related to an unsuccessful migration process too.
yfain commentedon Apr 8, 2018
I didn't migrate any projects but generated a new one.
julianobrasil commentedon Apr 8, 2018
Oh, sorry. Another thing I've noticed in rc.* versions is that
-proddoesn't work anymore when you're building. You must use--prod. It's likely the same withng serve.tomastrajan commentedon Apr 8, 2018
Have the same problem on newly generated project.
julianobrasil commentedon Apr 8, 2018
I can confirm it works if you use
--prod(double dashes) instead of-prodyfain commentedon Apr 8, 2018
It worked with double dashes
--prodbut 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.
filipesilva commentedon Apr 9, 2018
We removed single dash support in 6.0 to make way for single dash to be used with multiple flags in the future (
-abcdwould 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.
clydin commentedon Apr 11, 2018
Error messages resolved via #10245
angular-automatic-lock-bot commentedon Sep 8, 2019
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.