core
core copied to clipboard
typescript package: Cannot find module 'lodash.get`
Describe the bug
@module-federation/typescript package reports Cannot find module 'lodash.get when used in a project.
Probably due to this line: https://github.com/module-federation/core/blob/main/packages/typescript/src/lib/normalizeOptions.ts#L3
There is no lodash deps in package.json of the package. However, you do have it in the root package.json of the project. Is this a bug, or am I missing something obvious?
Reproduction
Just use the package in a project that doesnt otherwise use lodash.get
Used Package Manager
npm
System Info
System:
OS: macOS 14.4.1
CPU: (10) arm64 Apple M2 Pro
Memory: 2.27 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/Library/Caches/fnm_multishells/6401_1713251889313/bin/node
npm: 10.2.4 - ~/Library/Caches/fnm_multishells/6401_1713251889313/bin/npm
pnpm: 8.9.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 124.0.6367.92
Safari: 17.4.1
Validations
- [X] Read the docs.
- [X] Read the common issues list.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Module federation issue and not a framework-specific issue.
- [X] The provided reproduction is a minimal reproducible example of the bug.