yarn build:mirador fails on 8.4 — BlueprintJS version incompatible with React 16

未关闭
#5,802 3 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Aryakoste 已经在做这个了。

开始于 2026年6月30日。

评估

这个 Issue 还没有评估数据。

描述

affects: 8.x bug dependencies high priority

Describe the bug

When upgrading to DSpace Angular 8.4, running yarn build:mirador fails during the build pipeline. This happens because the build process runs yarn add @blueprintjs/core @blueprintjs/icons without specifying a version, which pulls in BlueprintJS v6.15.0.

These newer BlueprintJS packages require React 18, but DSpace Angular 8.4 natively uses React 16.14.0. This mismatch causes the build to crash due to missing React APIs (react-dom/client, react/jsx-runtime, useId, and useSyncExternalStore).

Error Logs:

WARNING in ./node_modules/@blueprintjs/core/lib/esm/components/overlay2/overlay2.js 502:15-20
export 'useId' (imported as 'useId') was not found in 'react'

WARNING in ./node_modules/@blueprintjs/core/lib/esm/hooks/overlays/useLegacyOverlayStack.js 47:18-38
export 'useSyncExternalStore' (imported as 'useSyncExternalStore') was not found in 'react'

ERROR in ./node_modules/@blueprintjs/core/lib/esm/components/context-menu/contextMenuSingleton.js 18:0-46
Module not found: Error: Can't resolve 'react-dom/client' in '/app/node_modules/@blueprintjs/core/lib/esm/components/context-menu'

ERROR in ./node_modules/@blueprintjs/core/lib/esm/components/toast/overlayToaster.js 19:0-46
Module not found: Error: Can't resolve 'react-dom/client' in '/app/node_modules/@blueprintjs/core/lib/esm/components/toast'

ERROR in ./node_modules/@floating-ui/react/dist/floating-ui.react.mjs 3:0-56
Module not found: Error: Can't resolve 'react/jsx-runtime' in '/app/node_modules/@floating-ui/react/dist'

webpack 5.106.2 compiled with 3 errors and 2 warnings in 16855 ms

To Reproduce

Environment Context:

  • DSpace Angular version: 8.4 (tag dspace-8.4, commit 8d1244e506746e90a91b493a2632eb4682fcf7f7)
  • Node version: 22.22.3
  • Yarn version: 1.22.22
  • React version: 16.14.0

Steps to reproduce the behavior:

  1. docker pull dspace/dspace-angular:dspace-8.4
  2. docker run -it --entrypoint sh dspace/dspace-angular:dspace-8.4
  3. yarn add @blueprintjs/core @blueprintjs/icons
  4. yarn build:mirador

Expected behavior

The yarn build:mirador command should compile successfully without breaking changes or missing peer dependency errors. The installed versions of @blueprintjs/core and @blueprintjs/icons should be pinned or restricted to versions that are backward-compatible with DSpace Angular's React 16.14.0 environment.

Related work

This issue was discovered during an upgrade of the Scholaris Service while attempting to transition from DSpace 8.3 to 8.4 with BUILD_MIRADOR=true enabled in the GitLab CI configuration.

主要语言
TypeScript
星标
180
派生
577
平均合并
1 天 23 小时
30 天内合并 PR
95

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DSpace/dspace-angular 的其他 Issue

查看 DSpace/dspace-angular 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。