You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The react-error-boundary package is used in both ra-core and ra-ui-materialui since 5.0.0-beta.0
To fix the issue:
This react-error-boundary package probably should be listed as peer and dev dependencies of ra-core and ra-ui-materialui and listed as dependencies of react-admin. Main reason is we don't want duplicate instances of react-error-boundary package when we install react-admin as it may break the context singleton.
Other information:
Environment
Note: I suggest adding these two fields below to the issue template to help gather more debugging information
Package manager: Yarn PnP
Bundler: vite
React-admin version: 5.0.0-beta.0
Last version that did not exhibit the issue (if applicable): 5.0.0-alpha-0
React version: 18.3
Browser: Safari
Stack trace (in case of a JS error):
Error: ra-core tried to access react-error-boundary, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: react-error-boundary
Required by: ra-core@virtual:57ec434b280cecc21f0d850993a2b40d7d7207392bbeca8dfeb365d37d5e155154e25e45acd205ce4a7bdcebf37261127fea25b17cc30a453cf436af297bfcfb#npm:5.0.0-beta.0 (via /builder/f1c83f7c_6908322106/.yarn/virtual/ra-core-virtual-cf17e9d32a/3/root/.yarn/berry/cache/ra-core-npm-5.0.0-beta.0-4ab55eff7b-10c0.zip/node_modules/ra-core/dist/cjs/core/)
Require stack:
What you were expecting:
I expect there would be no errors when upgrading from v5 alpha to v5 beta
What happened instead:
Seems the dependency of react-error-boundary is not configured correctly in ra-core
It's missing in the package.json of ra-core
Steps to reproduce:
A regression is introduced in #9799
Related code:
The
react-error-boundary
package is used in bothra-core
andra-ui-materialui
since 5.0.0-beta.0To fix the issue:
This
react-error-boundary
package probably should be listed as peer and dev dependencies ofra-core
andra-ui-materialui
and listed as dependencies ofreact-admin
. Main reason is we don't want duplicate instances ofreact-error-boundary
package when we installreact-admin
as it may break the context singleton.Other information:
Environment
Note: I suggest adding these two fields below to the issue template to help gather more debugging information
Package manager: Yarn PnP
Bundler: vite
Error: ra-core tried to access react-error-boundary, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: react-error-boundary
Required by: ra-core@virtual:57ec434b280cecc21f0d850993a2b40d7d7207392bbeca8dfeb365d37d5e155154e25e45acd205ce4a7bdcebf37261127fea25b17cc30a453cf436af297bfcfb#npm:5.0.0-beta.0 (via /builder/f1c83f7c_6908322106/.yarn/virtual/ra-core-virtual-cf17e9d32a/3/root/.yarn/berry/cache/ra-core-npm-5.0.0-beta.0-4ab55eff7b-10c0.zip/node_modules/ra-core/dist/cjs/core/)
Require stack:
❯ Function.require$$0.Module._resolveFilename .pnp.cjs:16996:13
❯ Function.require$$0.Module._load .pnp.cjs:16887:31
❯ Object. .yarn/virtual/ra-core-virtual-cf17e9d32a/3/root/.yarn/berry/cache/ra-core-npm-5.0.0-beta.0-4ab55eff7b-10c0.zip/node_modules/ra-core/src/core/CoreAdminUI.tsx:12:1
❯ Object.require$$0.Module._extensions..js .pnp.cjs:17039:33
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'MODULE_NOT_FOUND', pnpCode: 'UNDECLARED_DEPENDENCY', data: { request: 'react-error-boundary', issuer: '/builder/f1c83f7c_6908322106/.yarn/virtual/ra-core-virtual-cf17e9d32a/3/root/.yarn/berry/cache/ra-core-npm-5.0.0-beta.0-4ab55eff7b-10c0.zip/node_modules/ra-core/dist/cjs/core/', issuerLocator: { name: 'ra-core', reference: 'virtual:57ec434b280cecc21f0d850993a2b40d7d7207392bbeca8dfeb365d37d5e155154e25e45acd205ce4a7bdcebf37261127fea25b17cc30a453cf436af297bfcfb#npm:5.0.0-beta.0' }, dependencyName: 'react-error-boundary' }, requireStack: [ '/builder/f1c83f7c_6908322106/.yarn/virtual/ra-core-virtual-cf17e9d32a/3/root/.yarn/berry/cache/ra-core-npm-5.0.0-beta.0-4ab55eff7b-10c0.zip/node_modules/ra-core/dist/cjs/core/CoreAdminUI.js' ] }
The text was updated successfully, but these errors were encountered: