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

前端 未结 7 837
春和景丽
春和景丽 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 17:05

    OS : Windows with Angular 4

    "@angular/cli": "1.2.1"

    "@angular/material": "2.0.0-beta.6"

    I just removed the caret from above two dependencies and performed following steps, everything started working perfectly.

    1. Remove node_module
    2. Uninstall angular cli from local and global
    3. Install the same version of angular cli in both
    4. Do "npm install"
    5. "ng serve"

提交回复
热议问题