You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何Stencil组件库用angular-devkit/build-angular构建时缺失Components符号?

Stencil版本升级后Angular构建报错问题

我们在Big Give维护一个基于Stencil和build-angular构建的Web组件库。

上周尝试将Stencil从v2升级到v3时,生成Angular发布包过程中触发如下错误:

117 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> angular@0.0.0 build
> ng build

Building Angular Package

------------------------------------------------------------------------------
Building entry point '@biggive/components-angular'
------------------------------------------------------------------------------
- Compiling with Angular sources in Ivy partial compilation mode.
✖ Compiling with Angular sources in Ivy partial compilation mode.
projects/components/src/lib/stencil-generated/components.ts:7:15 - error TS2305: Module '"@biggive/components/dist/components"' has no exported member 'Components'.

7 import type { Components } from '@biggive/components/dist/components';
                ~~~~~~~~~~


Exited with code exit status 1

后续发现该错误在Stencil v2版本中同样存在,目前无法确定为何此前未出现。

相关错误的构建详情可在CircleCI查看:

  • 首次升级至Stencil v3的构建任务
  • 用于复现错误的临时分支构建任务
  • Stencil v2分支的错误构建任务

内容的提问来源于stack exchange,提问作者bdsl

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 13:30:09