-
-
Notifications
You must be signed in to change notification settings - Fork 296
Description
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-mdv1 - Install some packages from v2 version, and specially
@react-md/states - Remove
react-mdv1
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.