Not the answer for your question, but the answer to the problem you mentioned:
It looks like you have wrong configuragion file for the angular-cli version you are using.
In angular-cli.json file, try to change the following:
from:
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
to:
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}