Cannot allow speed-responsive due to lack of lodash dependencies

I hacked this a bit. I have lodash and velocity-react . velocity-react depends on lodash@3.10.0 .

When I create my application using webpack 2, I get several errors like this:

 Module not found: Error: Can't resolve 'lodash/object/extend' 

However, if I change the version to 3.10.0 , it generates a lot of different errors for different packages, saying things like:

 Module not found: Error: Can't resolve 'lodash/isObject' 

It seems that the problem is that these libraries depend on different major versions of lodash. How to fix it?

EDITOR: I found a workaround, but that of course does not work a bit. I can add the following to my resolve.alias to fix it:

 'lodash/object/omit': 'lodash/omit', 'lodash/object/extend': 'lodash/extend', 'lodash/lang/isObject': 'lodash/isObject', 'lodash/lang/isEqual': 'lodash/isEqual', 'lodash/collection/forEach': 'lodash/forEach', 'lodash/collection/each': 'lodash/each', 'lodash/collection/pluck': 'lodash/map', 'lodash/object/keys': 'lodash/keys', 

But why should I do this? Of course, there should be a better solution.

+7
javascript webpack
source share

No one has answered this question yet.

See related questions:

126
How to bundle vendor scripts separately and require them as needed using Webpack?
3
Module not found: style cannot be resolved
2
Module not found: Error: Cannot resolve module components / application. problem with webpack + reactjs
2
reaction icons resolve webpack error
2
React Webpack 4 Allow Alias
one
Webpack cannot eliminate React components
one
Module not found: Error: cannot resolve module 'fs'
0
webpack + typescript + lodash
0
ERROR in input module not found: Error: cannot enable "buffer loader"
0
Webpack Dependency Handling (Cant resolve '..')

All Articles