Angular 2 打字稿:无法读取未定义的属性 newLine [英] Angular 2 typescript: Cannot read property newLine of undefined

查看:31
本文介绍了Angular 2 打字稿:无法读取未定义的属性 newLine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 angular-CLI 用于 angular 2,为了运行,我在 ng serve 获取模块构建失败后在命令提示符下执行 ng serve 为我的所有 angular 2 项目无法读取未定义的属性 newLine"错误.

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

我关注了angular 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆