TypeError:无法读取未定义的Angular 10的属性“ toString”

问题描述

我正在尝试构建一个角度为10的库,但是我遇到了问题。 在角度9时效果很好。

当项目从角度9迁移到角度10时,会发生此问题。

[error] TypeError: Cannot read property 'toString' of undefined
    at new Input (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/postcss/lib/input.js:53:20)
    at parse (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/postcss/lib/parse.js:13:15)
    at new LazyResult (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/postcss/lib/lazy-result.js:60:16)
    at Processor.<anonymous> (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/postcss/lib/processor.js:138:12)
    at Processor.process (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/postcss/lib/processor.js:117:23)
    at StylesheetProcessor.process (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/ng-packagr/lib/styles/stylesheet-processor.js:47:46)
    at Object.readResource (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/ng-packagr/lib/ts/cache-compiler-host.js:80:57)
    at TsCompilerAotCompilerTypeCheckHostAdapter.loadResource (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/@angular/compiler-cli/src/transformers/compiler_host.js:504:37)
    at Object.get (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/@angular/compiler/bundles/compiler.umd.js:28507:94)
    at Directivenormalizer._fetch (/opt/fms/Control-Viewer-Iom/iolm-control-lib/node_modules/@angular/compiler/bundles/compiler.umd.js:20345:47)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)