且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2022-10-14 18:57:24

在package.json中我更改了:

 devDependencies:{
@ angular / cli :1.0.0

收件人:

 d evDependencies:{
@ angular / cli:1.2.0


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: Cannot read property 'newLine' of undefined at Object.getNewLineCharacter (/Users/leongaban/Projects/TickerTags/wikitags/node_modules/typescript/lib/typescript.js:8062:20)

I tried the answers here and here but no effect :(

My global and local npm version for angular-cli is 1.0.0-beta.28.3 how do I upgrade that to .30? I tried @latest


My local package.json:

"devDependencies": {
    "@angular/cli": "1.0.0-beta.28.3",
    "@angular/compiler-cli": "^2.4.0",


My global package:


I see that the latest is beta.32 https://github.com/angular/angular-cli/releases

However when I run npm install -g angular-cli@latest it still installs .28.3

In package.json I changed:

"devDependencies": {
   "@angular/cli": "1.0.0"

To:

"devDependencies": {
   "@angular/cli": "1.2.0"