Skip to content

Conversation

@rsimon
Copy link
Member

@rsimon rsimon commented Oct 31, 2025

In this PR

This PR fixes a regression related to a recent build config change in @recogito/react-pdf-annotator. The fix itself happened in the library build. This PR just updates our package.json to the lastest, bugfixed lib version.


The problem: After upgrading @recogito/react-pdf-annotator from version 1.2.0 to 1.3.0, PDF rendering would break fatally on load with the following message:

TypeError: Cannot read properties of undefined (reading 'recentlyCreatedOwnerStacks')

The only change between the two version was an adjustment in the package build configuration, which attempted to make the package "dual-support", i.e. compatible with both React 18 and 19. (Recogito Studio currently uses React 18, but will likely get upgraded to React 19 at some point.)

The catch: The build config change made the declaration look compatible to host applications that used either React 18 or 19. But the bundle itself was now getting built with React 19. Which means that – despite the React 18/19 declaration – host apps using React 18 would run into the above error at runtime.

The fix to this problem is here, and was to:

  • keep the peerDependencies accept both React 18 and 19, but at the same time
  • specify React 18 as devDependency, so that the library itself gets built against React 18.

@netlify
Copy link

netlify bot commented Oct 31, 2025

Deploy Preview for vico-design ready!

Name Link
🔨 Latest commit 2f13ae6
🔍 Latest deploy log https://app.netlify.com/projects/vico-design/deploys/69085fe63011c00008e2385f
😎 Deploy Preview https://deploy-preview-425--vico-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 31, 2025

Deploy Preview for recogito-cloud-staging ready!

Name Link
🔨 Latest commit 2f13ae6
🔍 Latest deploy log https://app.netlify.com/projects/recogito-cloud-staging/deploys/69085fe6326c5c000836feab
😎 Deploy Preview https://deploy-preview-425--recogito-cloud-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rsimon rsimon requested a review from blms October 31, 2025 09:45
@rsimon rsimon force-pushed the rs/pdf-regression-troubleshooting branch from c39ff16 to 2f13ae6 Compare November 3, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants