Angular 2打字稿:无法读取未定义的属性newLine [英] Angular 2 typescript: Cannot read property newLine of undefined
问题描述
我正在使用angular-CLI来执行angular 2,为了运行,我正在为我所有的angular 2项目构建模块构建失败无法读取属性newLine的未定义"错误后,在命令提示符下执行ng serve.
I am using angular-CLI for angular 2, for running I am doing ng serve in command prompt after ng serve getting module build failed 'Cannot read property newLine of undefined' error for all my angular 2 projects.
Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (C:\Users\timebound\angularJson\node_modules\typescript\lib\typescript.js:8062:20)
at Object.createCompilerHost (C:\Users\timebound\angularJson\node_modules\typescript\lib\typescript.js:44978:26)
at Object.ngcLoader (C:\Users\timebound\angularJson\node_modules\@ngtools\webpack\src\loader.js:329:31)
@ multi webpack-dev-server/client? http://localhost:4300/ ./src/main .ts
@ multi webpack-dev-server/client?http://localhost:4300/ ./src/main.ts
我关注了角度cli问题,但我仍然无法解决,我刚接触Angular 2,请帮助我
I followed angular cli issues,still i am not able to fix, i am newer to angular 2, please help me
推荐答案
将devDependencies从"angular-cli": "1.0.0-beta.28.3"
更改为"@angular/cli": "1.0.0-beta.30"
change the devDependencies from "angular-cli": "1.0.0-beta.28.3"
to "@angular/cli": "1.0.0-beta.30"
这篇关于Angular 2打字稿:无法读取未定义的属性newLine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!