aws-amplify / aws-amplify/amplify-cli-export-construct

RuntimeError: Cannot find module 'lodash' (Python)

Open
#62 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.