aws-amplify / aws-amplify/amplify-cli-export-construct
RuntimeError: Cannot find module 'lodash' (Python)
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Hello.
Issue:
When trying to import aws_amplify.cdk.exported_backend package (pip) into cdk project (Python) there is an error:
```
RuntimeError: Cannot find module 'lodash'
Require stack:
- /private/var/folders/d8/xplnxkfn46d_5wcmx25crr540000gn/T/jsii-kernel-rOvfLj/node_modules/@aws-amplify/cdk-exported-backend/lib/export-backend-asset-handler/index.js
- /private/var/folders/d8/xplnxkfn46d_5wcmx25crr540000gn/T/jsii-kernel-rOvfLj/node_modules/@aws-amplify/cdk-exported-backend/lib/export-backend.js
- /private/var/folders/d8/xplnxkfn46d_5wcmx25crr540000gn/T/jsii-kernel-rOvfLj/node_modules/@aws-amplify/cdk-exported-backend/lib/index.js
- /var/folders/d8/xplnxkfn46d_5wcmx25crr540000gn/T/jsii-kernel-rOvfLj
```
Prerequisites:
- Python 3.10
- aws-cdk-lib==2.83.0
- cdk export library version: 0.0.6
- Project: empty cdk project created with:
```
cdk init app --language python
```
Workaround:
- remove lodash from project (as described in this pull request: https://github.com/aws-amplify/amplify-cli-export-construct/pull/60)
- build pip .whl package as described here: https://www.matthewbonig.com/2020/01/11/creating-constructs/
- install created .whl via pip
Contributor guide
Assessment
This issue has not been assessed yet.