I was trying to run a command that would allow me to both build my Angular project and deploy it to firebase hosting in a one line command in VS Code's terminal using the Angular CLI.
After running this command
ng build --prod && firebase deploy
I was met with this error message:
At line:1 char:17 + ng build --prod && firebase deploy + ~~ The token '&&' is not a valid statement separator in this version. + CategoryInfo : ParserError: (:) , ParentContainsErrorRecordException + FullyQualifiedErrorId : InvalidEndOfLine
The solution is to use a | instead of && to separate your commands, for example:
ng build --prod | firebase deploy
I hoped this short blog post helped you fix the '&&' is not a valid statement separator error when building your Angular App using VS Code.