mgechev / mgechev/react-reorderable
Errors importing ReactReorderable (ES6, Webpack)
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I'm using Webpack and the code is following the ES6 syntax.
When importing:
```
import ReactReorderable from 'react-reorderable'
```
I get this when webpack tries to compile the bundles:
```
ERROR in ./~/react-reorderable/dist/react-reorderable.js
Module not found: Error: Cannot resolve module 'React' in /home/dev/app/node_modules/react-reorderable/dist
@ ./~/react-reorderable/dist/react-reorderable.js 3:4-43
ERROR in ./~/react-reorderable/dist/react-reorderable.js
Module not found: Error: Cannot resolve module 'ReactDrag' in /home/dev/app/node_modules/react-reorderable/dist
@ ./~/react-reorderable/dist/react-reorderable.js 3:4-43
```
Note that:
- react-reorderable is in node_moduels, and react-drag is in its node_module's dir as well.
- React is available, and everything else that uses it even in the same component I'm importing ReactReorderable. The compile errors come up when I import the object.
- I'm using React 0.13 if it matters
- Its installed via npm
- Same happens when installing via github.
Any ideas? so far this component works well both in browser and mobile browser. Can't say the same for react-dnd...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with dist/react-reorderable.js and the package's dependency layout, then reproduce the reported Webpack import using React 0.13. Check how React and ReactDrag are referenced and resolved from the installed package. Done means importing react-reorderable compiles without the reported module-not-found errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100