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 8d1244e)
- Node version: 22.22.3
- Yarn version: 1.22.22
- React version: 16.14.0
Steps to reproduce the behavior:
- docker pull dspace/dspace-angular:dspace-8.4
- docker run -it --entrypoint sh dspace/dspace-angular:dspace-8.4
- yarn add @blueprintjs/core @blueprintjs/icons
- 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.
Describe the bug
When upgrading to DSpace Angular 8.4, running
yarn build:miradorfails during the build pipeline. This happens because the build process runsyarn add @blueprintjs/core @blueprintjs/iconswithout 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, anduseSyncExternalStore).Error Logs:
To Reproduce
Environment Context:
Steps to reproduce the behavior:
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.