首页 > 解决方案 > Angular 项目 .sass 无法构建

问题描述

当我尝试构建或提供 Angular 应用程序时,我遇到了以下描述的情况。文件肯定在那里。什么可能导致这种情况?

ng build

找不到多 ./src/styles.sass 模块中的错误:错误:无法解析“/Users/konstantinwerhahn”中的“/Users/konstantinwerhahn/Go/src/github.com/randomprofile/khw/src/styles.sass” /Go/src/github.com/randomprofile/khw'

标签: angular

解决方案


好吧很奇怪。我找到了答案,但不是它到达那里的原因。

由于某种原因,扩展名默认为 .sass ,当更改为 .scss 时,一切正常。

"styles": [
  "src/styles.scss" // default was: src/styles.sass
],

推荐阅读