javascript - angular-cli构建工具报错
本文介绍了javascript - angular-cli构建工具报错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
使用angular-cli
执行ng new hello-angular
后执行ng serve
报如下错误
ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'newLine' of undefined at Object.getNewLineCharacter (C:\Users\sunny\Documents\hello-angular\node_modules\typescript\lib\typescript.js:8062:20) at Object.createCompilerHost (C:\Users\sunny\Documents\hello-angular\node_modules\typescript\lib\typescript.js:44978:26) at Object.ngcLoader (C:\Users\sunny\Documents\hello-angular\node_modules\@ngtools\webpack\src\loader.js:171:31)
解决方案
感谢回答,尝试之后发现是node-sass
安装的问题,之前用cnpm
安装的,换成npm
安装就好了
这篇关于javascript - angular-cli构建工具报错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文