【发布时间】:2021-04-25 07:25:55
【问题描述】:
所以...我有最新版本的 nx (11.1.5) 在新工作区 (--preset empty) 中运行,我想添加一个新的可构建角度库。
nx g @nrwl/angular:library --buildable --style scss --name my-lib
库已创建并且似乎没问题。接下来,我想在不更改代码内容的情况下构建该库:
nx build my-lib
我的期望是,这个过程没有任何问题。构建一个空模块没有意义,但应该可以,对吧?
但是构建退出并显示以下错误消息:
No provider for InjectionToken ng.v5.stylesheetProcessor! (InjectionToken nx.v1.packageTransform -> InjectionToken nx.v1.entryPointTransform -> InjectionToken ng.v5.compileNgcTransform -> InjectionToken ng.v5.stylesheetProcessor)
即使我在应用程序中添加组件并导出它们或导入模块,也会出现错误。
我在这里缺少什么?这是一个错误吗?
它也可以在示例 repo 中重现:https://github.com/nrwl/nx-examples
问候
【问题讨论】:
-
我也有同样的问题。