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

Attempted import error: 'usePopupState' is not exported #112

Open
wimil opened this issue Nov 4, 2022 · 4 comments
Open

Attempted import error: 'usePopupState' is not exported #112

wimil opened this issue Nov 4, 2022 · 4 comments

Comments

@wimil
Copy link

wimil commented Nov 4, 2022

Attempted import error: 'usePopupState' is not exported from 'material-ui-popup-state/hooks' (imported as 'usePopupState').

i am trying to compile my code to production and i am running into this error, i am using this plugin and i suspect it has something to do with it. if someone can help me please.

plugins:
"react-app-rewire-alias"
"react-app-rewired"

I get this error when I go to build my application.

@wimil
Copy link
Author

wimil commented Nov 10, 2022

can someone help me with this, I'm stuck and can't compile my application for production.

@jedwards1211
Copy link
Member

sorry for the delay, it doesn't sound like this issue is caused by this package, and I've never tried using those plugins, but if you post more information about your config I can try to help

@edbella
Copy link

edbella commented Jan 19, 2023

I encountered this error as well using the hooks derivative.

Only way forward here is to use the HOC PopupState

@jedwards1211
Copy link
Member

jedwards1211 commented Jan 19, 2023

What version of material-ui-popup-state are y'all using?

In 5.0.4, ./hooks is exported, and the referenced MJS and CJS files are included in the published package and have the necessary exports. I can't link directly to these files in NPM, but you can see for yourself in their explorer: https://www.npmjs.com/package/material-ui-popup-state/v/5.0.4?activeTab=explore

If there's some mistake in my export map I don't realize, please let me know. But I can't see any, so I think the problem is caused by tools y'all are using and there's nothing I can change in this package to solve the problem for you.

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

No branches or pull requests

3 participants