Module build failed: TypeError: Cannot read property 'newLine' of undefined

前端 未结 7 836
春和景丽
春和景丽 2021-01-17 16:26

Everything was running fine yesterday, now when I try to ng serve I get these errors:

ERROR in ./src/main.ts Module build failed: TypeError

7条回答
  •  旧巷少年郎
    2021-01-17 16:58

    Just update to "@angular/cli": "1.0.0-rc.0" "@angular/compiler-cli": "2.4.0" in your package.json and update file angular-cli.json like below

    change

    "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
    }
    

    by

    "environmentSource": "environments/environment.ts",
          "environments": {
            "dev": "environments/environment.ts",
            "prod": "environments/environment.prod.ts"
          }  
    

提交回复
热议问题