Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

ModuleNotFoundError: No module named 'aws_cdk' #52

Open
ema- opened this issue Apr 28, 2022 · 1 comment
Open

ModuleNotFoundError: No module named 'aws_cdk' #52

ema- opened this issue Apr 28, 2022 · 1 comment

Comments

@ema-
Copy link

ema- commented Apr 28, 2022

The following step:

..... runs-on: ubuntu-18.04  (Same for ubuntu-latest)
....

      - name: cdk diff
        uses: youyo/aws-cdk-github-actions@v2
        with:
          cdk_subcommand: 'diff'
          cdk_stack: 'MyStack'
          actions_comment: true
          working_dir: 'cdk'
          debug_log: true
          cdk_version: '1.135' (same result for latest)
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: ${{ env.region }}

Fails with:

Run youyo/aws-cdk-github-actions@v2
/usr/bin/docker run --name b31f4027516b598475bb9a49f3fd93[20](https://github.com/perusetechnology/lambda-ocr-and-postprocess/runs/6219902057?check_suite_focus=true#step:8:20)17c_05ebfc --label 294b31 --workdir /github/workspace --rm -e env -e GITHUB_REPOSITORY -e GITHUB_SHA -e region -e accountId -e AWS_DEFAULT_REGION -e AWS_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e INPUT_CDK_SUBCOMMAND -e INPUT_CDK_STACK -e INPUT_ACTIONS_COMMENT -e INPUT_WORKING_DIR -e INPUT_DEBUG_LOG -e INPUT_CDK_VERSION -e INPUT_CDK_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/lambda-ocr-and-postprocess/lambda-ocr-and-postprocess":"/github/workspace" 294b31:f4027516b598475bb9a49f3fd932017c
npm WARN saveError ENOENT: no such file or directory, open '/github/workspace/cdk/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/github/workspace/cdk/package.json'
npm WARN cdk No description
npm WARN cdk No repository field.
npm WARN cdk No README data
npm WARN cdk No license field.

+ [email protected]
added 1 package from 1 contributor and audited 1 package in 1.937s
found 0 vulnerabilities

Install aws-cdk latest
/usr/bin/cdk -> /usr/lib/node_modules/aws-cdk/bin/cdk
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/aws-cdk/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ aws-cdk@2.[22](https://github.com/perusetechnology/lambda-ocr-and-postprocess/runs/6219902057?check_suite_focus=true#step:8:22).0
added 1 package from 1 contributor in 1.913s
Successful install aws-cdk latest
Run cdk diff  "MyStack"
Traceback (most recent call last):
  File "app.py", line 8, in <module>
    from aws_cdk import aws_ec2 as ec2
ModuleNotFoundError: No module named 'aws_cdk'

Subprocess exited with error 1
CDK subcommand diff for stack MyStack has failed. See above console output for more details.

@simonloach
Copy link

Does anyone know what the cause for that issue might be?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants