Angular 7 - ng build --prod TypeError: Cannot read property '1' of undefined

Angular 7 - ng build --prod TypeError: Cannot read property '1' of undefined

在构建我的 Angular 生产项目时 ng buid --prod 我收到以下错误:

10% 构建模块 3/4 模块 1 个活动 .../client/src/styles.sass/media/client/node_modules/clean-css/lib/optimizer/level-1/optimize.js:429 context.warnings.push('Invalid value token at ' + formatPosition(value[0][1][2][0]) + '.忽略。');

TypeError: Cannot read property '1' of undefined
    at optimizeBody (/media/client/node_modules/clean-css/lib/optimizer/level-1/optimize.js:429:82)
    at level1Optimize (/media/client/node_modules/clean-css/lib/optimizer/level-1/optimize.js:657:9)
    at level1Optimize (/media/client/node_modules/clean-css/lib/optimizer/level-1/optimize.js:648:9)
    at optimize (/media/client/node_modules/clean-css/lib/clean.js:144:5)
    at /media/client/node_modules/clean-css/lib/clean.js:120:29
    at /media/client/node_modules/clean-css/lib/reader/read-sources.js:26:64
    at loadOriginalSources (/media/client/node_modules/clean-css/lib/reader/load-original-sources.js:26:5)
    at /media/client/node_modules/clean-css/lib/reader/read-sources.js:26:14
    at applySourceMaps (/media/client/node_modules/clean-css/lib/reader/apply-source-maps.js:34:5)
    at /media/client/node_modules/clean-css/lib/reader/read-sources.js:25:12
    at fromStyles (/media/client/node_modules/clean-css/lib/reader/read-sources.js:152:5)
    at fromString (/media/client/node_modules/clean-css/lib/reader/read-sources.js:48:10)
    at doReadSources (/media/client/node_modules/clean-css/lib/reader/read-sources.js:33:12)
    at readSources (/media/client/node_modules/clean-css/lib/reader/read-sources.js:24:10)
    at /media/client/node_modules/clean-css/lib/clean.js:115:12
    at _combinedTickCallback (internal/process/next_tick.js:131:7)

早些时候,这一天一切正常。但是现在这个。

这似乎是由某些 css 优化器 clean-css 引起的,但我不知道如何修复它。 (我尝试更新并重新安装 angular)

我发现了问题。

真的很傻,我不知道为什么我在服务时出错。

我在我的 .sass 个文件中忘记了一个 space

我写了:transform:rotate(360deg)

但应该是:transform: rotate(360deg)