模块构建失败:TypeError:无法读取未定义的属性"newLine"

Leo*_*ban 10 javascript angular-cli angular

在此输入图像描述

昨天一切都运行正常,现在当我尝试服务时,我得到了这些错误:

./src/main.ts中的错误模块构建失败:TypeError:无法读取Object.getNewLineCharacter上未定义的属性'newLine'(/Users/leongaban/Projects/TickerTags/wikitags/node_modules/typescript/lib/typescript.js:8062 :20)

我在这里这里尝试了答案,但没有效果:(

我对angular-cli的全局和本地npm版本是1.0.0-beta.28.3如何将其升级到.30的?我试过了@latest


我的本地package.json:

"devDependencies": {
    "@angular/cli": "1.0.0-beta.28.3",
    "@angular/compiler-cli": "^2.4.0",
Run Code Online (Sandbox Code Playgroud)

我的全球套餐:

在此输入图像描述


我看到最新的是beta.32 https://github.com/angular/angular-cli/releases

但是,当我运行npm install -g angular-cli@latest它仍然安装.28.3

小智 2

在 package.json 中我更改了:

"devDependencies": {
   "@angular/cli": "1.0.0"
Run Code Online (Sandbox Code Playgroud)

到:

"devDependencies": {
   "@angular/cli": "1.2.0"
Run Code Online (Sandbox Code Playgroud)