模块构建失败:类型错误:无法读取未定义的属性“newLine" [英] Module build failed: TypeError: Cannot read property 'newLine' of undefined
问题描述
昨天一切正常,现在当我尝试 ng serve 时出现以下错误:
<块引用>./src/main.ts 中的错误模块构建失败:类型错误:无法读取未定义的属性newLine"在 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"
致:
"devDependencies": {"@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"
这篇关于模块构建失败:类型错误:无法读取未定义的属性“newLine"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!