Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useGetRecordRepresentation not exported from ra-core #8168

Closed
btbenedi opened this issue Sep 15, 2022 · 3 comments
Closed

useGetRecordRepresentation not exported from ra-core #8168

btbenedi opened this issue Sep 15, 2022 · 3 comments

Comments

@btbenedi
Copy link

btbenedi commented Sep 15, 2022

Updating from 4.2.6 to 4.3.2

What you were expecting:
Both local dev and build success

What happened instead:
On both dev and build, receiving Attempted import error: 'useGetRecordRepresentation' is not exported from 'ra-core' (imported as 'useGetRecordRepresentation').

In local dev, I get additional info that this attempted import is occurring on ReferenceField, AutocompleteInput, and SelectInput in ra-ui-materialui

Steps to reproduce:
I do not see the issue on codesandbox.io fork, the main difference for us is we're using craco start and craco build as we utilize an alias feature for our importing. I am attempting a standalone sample app with craco to see if it's related to that or more global. Will update if I get that up and running with same error.

Environment

  • React-admin version: 4.3 (tested all 4.3.0, 4.3.1, and 4.3.2, all exhibit same behavior)
  • Last version that did not exhibit the issue (if applicable): 4.2.6
  • React version: 17.0.2
  • Browser:
  • Stack trace (in case of a JS error):
@fzaninotto
Copy link
Member

Hi,

Looking at the source, useGetRecordRepresentation is indeed exported since 4.3.0

The problem you meed may be caused by a duplicate ra-core in your node_modules. Could you check your yarn.lock for multiple versions of ra-core?

@btbenedi
Copy link
Author

Ahh dangit, I had version 4.2.7 of ra-data-json-server still in package.json, so package-lock.json still had ra-core 4.2.7

Reminder kids to update all your sibling packages 😂 all looks good now, thanks.

Side note, thanks for #7999, this is why we're updating.

@btbenedi btbenedi changed the title useGetRecordRepresenation not exported from ra-core useGetRecordRepresentation not exported from ra-core Sep 15, 2022
@WiXSL
Copy link
Contributor

WiXSL commented Sep 15, 2022

Closing this issue since it has been resolved

@WiXSL WiXSL closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants