2017-02-09 80 views
2

我正在使用angular-CLI for angular 2,用于运行我正在执行ng服务之后ng服务器获取模块生成失败'无法读取未定义的属性newLine'错误我所有的角度2项目。Angular 2打字稿:无法读取属性newLine undefined

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

我跟着angular cli issues,还是我不能够解决,我是新来的角2,请帮我

+0

请尝试来详细说明你的问题。如果不具体,我们不能帮你。 –

+0

即使在遵循角度cli升级说明后也有同样的问题,删除我的应用程序中的node_modes文件夹解决了它.. –

+0

@ frant.hartm谢谢,我通过运行npm启动而不是执行ng服务。 –

回答

6

变化从"angular-cli": "1.0.0-beta.28.3"的devDependencies到"@angular/cli": "1.0.0-beta.30"

+0

嗨,我试着用@latest安装,仍然坚持在'28.3'你怎么得到'.30'下载? http://stackoverflow.com/questions/42419964/module-build-failed-typeerror-cannot-read-property-newline-of-undefined –

相关问题