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

@react-md/states cannot resolve classnames #1155

Closed
melchor629 opened this issue May 17, 2021 · 0 comments
Closed

@react-md/states cannot resolve classnames #1155

melchor629 opened this issue May 17, 2021 · 0 comments
Labels
Milestone

Comments

@melchor629
Copy link

melchor629 commented May 17, 2021

Describe the bug

I was migrating react-md v1 to v2 and removed the v1 version with npm uninstall react-md. This action caused the following error to show up:

./node_modules/@react-md/states/es/useInteractionStates.js
Module not found: Can't resolve 'classnames' in '.../node_modules/@react-md/states/es'

To Reproduce

Don't have a really way to reproduce this (yet) but it might be like that:

  • Install react-md v1
  • Install some packages from v2 version, and specially @react-md/states
  • Remove react-md v1

Expected behavior

Everything working fine.

Platform

  • Windows 10 1804
  • node 12.22.1
  • npm 6.14.12

Additional context

I've found that after removing the react-md v1 package, all classnames installations are inside each @react-md/* package that references it (probably npm thought this was a good idea). But @react-md/states does not reference classnames (see package.json) but it is being used in useInteractionStates.js.

Installing classnames manually works, but it is a workaround, I prefer not to have this package installed manually. So I removed it and, in my case at least, running npm dedupe fixed the issue for now.

@melchor629 melchor629 added the bug label May 17, 2021
@mlaursen mlaursen added this to the v2.8.3 milestone May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants