aaronshaf / react-toggle

Elegant, accessible toggle component for React. Also a glorified checkbox.
http://aaronshaf.github.io/react-toggle/
MIT License
949 stars 157 forks source link

Cannot resolve module 'react-addons-shallow-compare' #82

Open salujaharkirat opened 7 years ago

salujaharkirat commented 7 years ago

Can anyone please tell if there is any dependency issue with the current version?

I am getting following errors on using latest versions


Module not found: Error: Cannot resolve module 'react-addons-shallow-compare' in /Users/aragorn/wealthy/taxo_new/node_modules/react-toggle/dist/component
 @ ./~/react-toggle/dist/component/index.js 29:33-72

This works fine with version 2.1.1.

Can someone please help me on this?

salujaharkirat commented 7 years ago

Looks like something else was working.. working fine.. Closing the issue

jgentes commented 7 years ago

I'm seeing this also:

npm WARN react-toggle@2.2.0 requires a peer of react-addons-shallow-compare@~0.14.0 || ^15.0.0 but none was installed.

jgentes commented 7 years ago

Looks like npm defaults to v2.2.0 for some reason.. by forcing v2.1.1 in package.json and uninstalling/reinstalling react-toggle, it seems to fix the problem.