[BUG] License check fails due to the inability to create a virtual environment.(WSL Ubuntu)

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js, python, typescript, ubuntu
Domain
devops, tooling

Research direction

Run npm run license -- --fix --debug in WSL Ubuntu and start with the LicenseChecker.createScanningEnvironment and LicenseChecker.scan entries shown in the error. Check how the command handles the missing Python virtual-environment support; done means the license scan completes and reports that licenses are up to date.

Written by the indexing model from the issue text.

Description

bug
Describe the bug

When attempting to run the license check command using npm run license -- --fix --debug, the process fails due to an inability to create a virtual environment in WSL. This prevents the license scanning process from completing successfully.

Expected Behavior

The license check command should create a virtual environment, scan the licenses, and output that the licenses are up to date.

Current Behavior

Error: Failed to create virtual environment /home/monisha/epo-cbm-forecast/license-debug/.venv
at LicenseChecker.createScanningEnvironment (/home/monisha/epo-cbm-forecast/node_modules/@cdklabs/cdk-cicd-wrapper-cli/lib/cmds/LicenseCommand.js:676:23)
at LicenseChecker.scan (/home/monisha/epo-cbm-forecast/node_modules/@cdklabs/cdk-cicd-wrapper-cli/lib/cmds/LicenseCommand.js:131:21)
at Object.handler (/home/monisha/epo-cbm-forecast/node_modules/@cdklabs/cdk-cicd-wrapper-cli/lib/cmds/LicenseCommand.js:760:90)
at /home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:8993
at j (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:4956)
at _.handleValidationAndGetResult (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:8962)
at _.applyMiddlewareAndGetResult (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:9604)
at _.runCommand (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:7231)
at [runYargsParserAndExecuteCommands] (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:58539)
at te.parse (/home/monisha/epo-cbm-forecast/node_modules/yargs/build/index.cjs:1:40478)
License scan failed

Reproduction Steps

Execute the following command in your repository:

npm run license -- --fix --debug

Possible Solution

The failure is due to the missing python3.11-venv package, which is necessary to create a virtual environment.

sudo apt install python3.11-venv

Additional Information/Context

No response

CDK CI/CD Wrapper version used

0.2.3

Environment details (OS name and version, etc.)

WSL Ubuntu

Dominant language
TypeScript
Stars
33
Forks
9
Avg merge
14h 32m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cdklabs/cdk-cicd-wrapper

All issues in cdklabs/cdk-cicd-wrapper

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.