Skip to content

Fix E2E PnP Angular workflow cache corruption issue#5

Draft
Sawsqr68 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-e2e-pnp-angular-workflow
Draft

Fix E2E PnP Angular workflow cache corruption issue#5
Sawsqr68 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-e2e-pnp-angular-workflow

Conversation

Copilot AI commented Dec 31, 2025

Copy link
Copy Markdown

The E2E PnP Angular workflow fails with ERR_MODULE_NOT_FOUND when the yargs package in Yarn's cache becomes corrupted.

Changes

  • Added yarn cache clean before yarn dlx to clear corrupted cache entries
  • Added --no-cache flag to yarn dlx command to force fresh package downloads
- name: 'Running the integration test'
  run: |
    source scripts/e2e-setup-ci.sh
    
    # Clear Yarn cache to prevent corrupted package issues
    yarn cache clean
    
    yarn dlx --no-cache -p @angular/cli@next ng new berry-angular --interactive=false --package-manager yarn
    
    cd berry-angular
    yarn ng build --aot

This prevents the workflow from using potentially corrupted cached packages that cause module resolution failures.

Original prompt

Problem

The E2E PnP Angular workflow is failing with the following error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/tmp/xfs-4ba0ca9e/dlx-2242/.yarn/cache/yargs-npm-18.0.0-ec82bf7b61-bf290e4723.zip/node_modules/yargs/build/lib/utils/apply-extends.js'

This error occurs because the yargs package in Yarn's cache is corrupted or incomplete.

Solution

Update the .github/workflows/e2e-pnp-angular-workflow.yml file to clear Yarn's cache before running the yarn dlx command and use the --no-cache flag to ensure fresh package downloads.

Changes Required

In the file .github/workflows/e2e-pnp-angular-workflow.yml, update the "Running the integration test" step (lines 27-37) to:

- name: 'Running the integration test'
  run: |
    source scripts/e2e-setup-ci.sh
    
    # Clear Yarn cache to prevent corrupted package issues
    yarn cache clean
    
    # TODO: Angular should be fixed to detect the correct package manager to install with
    # but for now we need to specify it
    yarn dlx --no-cache -p @angular/cli@next ng new berry-angular --interactive=false --package-manager yarn
    
    cd berry-angular
    
    yarn ng build --aot

The key changes are:

  1. Add yarn cache clean before the yarn dlx command
  2. Add --no-cache flag to the yarn dlx command to force fresh downloads

This will resolve the ERR_MODULE_NOT_FOUND error by ensuring packages are downloaded fresh rather than using potentially corrupted cached versions.

Reference

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…che flag

Co-authored-by: Sawsqr68 <173052944+Sawsqr68@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix E2E PnP Angular workflow cache issue Fix E2E PnP Angular workflow cache corruption issue Dec 31, 2025
Copilot AI requested a review from Sawsqr68 December 31, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants