[BUG] Springai-alibaba-admin 前端镜像构建失败
envgap__alibaba__spring-ai-alibaba-3949
01 / FAILURE SIGNATURE
As reported upstream
Error: GET https://registry.npmmirror.com/@spark-ai%2Fflow response 404 status, Access token expired or revoked. Please try logging in again.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
5f3fdce9b0a6bf27e5c3ae5ca8a4ca2114e3d071- Manifest
spring-ai-alibaba-admin/frontend/packages/spark-flow/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
alibaba/spring-ai-alibaba #3949 · read the original issue
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current Behavior
**问题描述**
执行 docker build 构建前端镜像时失败,错误信息:
```bash
Error: GET https://registry.npmmirror.com/@spark-ai%2Fflow response 404 status, Access token expired or revoked. Please try logging in again.
```
**根本原因**
项目中存在包名不一致的问题:
- 本地包定义 (packages/spark-flow/package.json):
```bash
{
"name": "@agentscope-ai/flow",
"version": "0.0.13"
}
```
- 依赖引用 (packages/main/package.json):
```bash
{
"dependencies": {
"@spark-ai/flow": "0.0.13" // ❌ 包名不匹配
}
}
```
当 cnpm install 执行时,npm workspaces 无法将 @spark-ai/flow 匹配到本地的 @agentscope-ai/flow,因此尝试从 npm 镜像源下载该私有包,但缺少认证 token 导致失败。
解决方案
统一使用 @agentscope-ai/flow 作为包名:
1. packages/main/package.json - 更新依赖名称
2. packages/main/.umirc.ts - 更新 webpack alias
3. 所有 .ts / .tsx 文件 - 更新 import 语句
### Expected Behavior
_No response_
### Steps To Reproduce
_No response_
### Environment
```markdown
Spring AI Alibaba version(s): main branch
```
### Debug logs
_No response_
### Anything else?
_No response_04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]