-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Cannot resolve @mui/utils/getReactNodeRef
#44096
Comments
You introduced this issue in |
Even the latest |
We should have pinned the versions of the @mui/base's dependencies when we stopped releasing it. Otherwise, we will need to keep releasing it until we actually plan to provide the migration to @base_ui/react. We can release the package with the release today to mitigate these issues. cc @DiegoAndai |
Indeed. I think this is the culprit #43957 (comment). Note to self: whenever a version bump is suggested by the release script, don't ignore it. |
We're releasing an updated "resolutions": {
"@mui/base": "https://pkg.csb.dev/mui/material-ui/commit/b0bcfcf6/@mui/base",
} |
@mnajdova @aarongarciah I'm not sure we should pin the versions. It might be more complex for the team to deal with different utils versions than updating |
@DiegoAndai thank you for the quick upcoming release, it resolves this issue |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @o-alexandrov How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
If I understand correctly, the problem was:
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
-import getReactNodeRef from '@mui/utils/getReactNodeRef';
+import getReactElementRef from '@mui/utils/getReactElementRef'; which is ok, the important piece is that we deleted
MUI X, etc.
It looks like HEAD is not in a working state. If we treat @mui/utils as unstable, we must upgrade all dependents to pin the version, MUI X, Material UI, etc. If we treat @mui/utils as stable, we have to add the old API back until the next major. Since we use @mui/utils in the docs, I believe anything that we expose without unstable_ can be considered public API. So we should add the old API back, no? I'm reopening to have space to discuss this further. Thoughts? For the long term, we have https://mui-org.notion.site/engineering-mui-utils-purpose-9a9fc9da3a004864b6c4e1f4d1f24f95 on better organizing those utils. Edit: Ah great, @Janpot spotted it this too in #44112.
@aarongarciah To be nuanced, this only made the problem more visible, it didn't create the issue. In the same way, releasing a new version helps but doesn't solve the problem. Actually, we can't fully solve the problem, only do our best to mitigate the spread of it. |
@mui/base
cannot resolve @mui/utils/getReactNodeRef
from Portal.js
@mui/base
cannot resolve @mui/utils/getReactNodeRef
👍 we should put old API back, we can't retroactively narrow down those ranges of older dependent packages, so they would be forever broken. For the future we'll have to make a choice: Either pin internal dependencies, or follow semver for internal APIs. (And if we choose the latter, we can't use |
@mui/base
cannot resolve @mui/utils/getReactNodeRef
@mui/utils/getReactNodeRef
Hello everyone, I don´t get the technicalities of the development of this library so I ask as a user. |
@cristopher55 version I will be on vacation the following weeks so I won't be able to lead this effort, I'm reassigning to @aarongarciah so we add the old API back, let's also add a deprecation message. |
For people landing here from this error (
|
Thanks a lot it worked perfectly 😄 |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @o-alexandrov How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
import getReactNodeRef from '@mui/utils/getReactNodeRef';
NPM file /@mui/base/Portal/Portal.js
getReactNodeRef
Current behavior
Error trace:
Your environment
npx @mui/envinfo
Search keywords: @mui/base, @mui/utils getReactNodeRef
The text was updated successfully, but these errors were encountered: