模块构建失败:TypeError:无法读取未定义的属性“newLine” [英] Module build failed: TypeError: Cannot read property 'newLine' of undefined
问题描述
昨天一切运行正常,现在当我尝试服务时,我收到了以下错误:
./src/main.ts中的错误
模块构建失败:TypeError:无法读取未定义
的属性'newLine' at Object.getNewLineCharacter(/Users/leongaban/Projects/TickerTags/wikitags/node_modules/typescript/lib/typescript.js:8062:20)
我尝试了答案
我看到最新的是beta.32 https://github.com/angular/angular-cli/releases
然而当我运行 npm install -g angular -cli @ latest
它仍安装 .28.3
在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"
这篇关于模块构建失败:TypeError:无法读取未定义的属性“newLine”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!