Closed medanat closed 6 years ago
I think you'll also need lodash-compat
. Just ran into the same issue here :(
@CentaurWarchief You're right, it's the next issue down the line. I've updated the PR to include lodash-compat
.
@medanat for me without lodash-es
in dependencies
the same error occur
@jdalton without lodash-es
and lodash-compat
in dependencies
I still have following errors:
Module build failed: Error: Cannot find module 'lodash-es'
Module build failed: Error: Cannot find module 'lodash-compat'
@antixrist
Could you please show me where in the production source those packages are referenced.
The Babel 7 compat PR only added 2 deps (babel-helper-module-imports
and babel-types
)
@jdalton From my understanding, I believe the ModuleCache.resolve
method in https://github.com/lodash/babel-plugin-lodash/blob/master/src/ModuleCache.js#L41 tries to require/import them given those packages are listed as the default in https://github.com/lodash/babel-plugin-lodash/blob/master/src/config.js#L7
@jdalton Those errors thrown from node's module
:
https://github.com/nodejs/node/blob/82790d84f2049cdd5e9aac4818a096834bed0118/lib/module.js#L540-L545
because you try to resolve all defaultsIds
.
But lodash-es
and lodash-compat
not installed because they not included in 'dependencies'
Hmm, that's not how that should work. 🤔
@jdalton error's stacktrace has shown that it works completely so as I described
Fixes #199