8000 Fix multiple Lit versions warning on app-report page by Copilot · Pull Request #5120 · pwa-builder/PWABuilder · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Copilot
Copy link
Contributor
@Copilot Copilot AI commented Oct 6, 2025

Problem

When loading the app-report page and opening the browser dev console (F12), a warning appeared about multiple versions of Lit being loaded. This occurred because the Frontend application and several component packages were using different minor versions of Lit.

Root Cause

The main Frontend app (apps/pwabuilder/Frontend) specified lit@^3.3.1 in its package.json, while several local component packages were still using lit@^3.3.0:

  • @pwabuilder/code-editor
  • @pwabuilder/manifest-editor
  • @pwabuilder/manifest-previewer
  • @pwabuilder/pwa-auth
  • pwabuilder-chromium-extension

Although both versions are compatible, having different versions caused Lit's runtime to detect multiple instances and issue a warning about potential issues.

Solution

Updated all component packages to use lit@^3.3.1, ensuring version consistency across the entire monorepo. This guarantees that npm installs only a single version of Lit, eliminating the warning.

Changes

Updated the lit dependency version in the following package.json files:

  • components/code-editor/package.json
  • components/manifest-editor/package.json
  • components/manifest-previewer/package.json
  • components/pwa-auth/package.json
  • apps/pwabuilder-chromium-extension/package.json

Verification

After the changes, running npm list lit in the Frontend app shows all dependencies consistently using lit@3.3.1:

microsoft.pwabuilder@1.0.0
├─┬ @pwabuilder/code-editor@0.0.1
│ └── lit@3.3.1
├─┬ @pwabuilder/manifest-editor@0.0.1
│ └── lit@3.3.1
├─┬ @shoelace-style/shoelace@2.20.1
│ └── lit@3.3.1 deduped
└── lit@3.3.1

The Frontend builds successfully and the multiple versions warning no longer appears in the browser console.

Fixes #[issue number]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
  • https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chrome-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG Bash 8-25] Multiple versions of Lit being loaded on app report page</issue_title>
<issue_description>### What happened?

See description

How do we reproduce the behavior?

Analyze a PWA. When the app report page loads, hit F12 to view dev console. In console, you'll see a warning about multiple Lit versions being loaded.

What do you expect to happen?

No response

What environment were you using?

Irrelevant

Additional context

No response</issue_description>

<agent_instructions>Figure out why we're loading 2 versions of Lit. It appears when we load the app-report.ts page, something on this page is causing another version of Lit to be loaded.

Ensure that all our components are using the same version of Lit.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #5078

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Contributor

Thanks @copilot for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

Copilot AI and others added 3 commits October 6, 2025 21:02
Co-authored-by: JudahGabriel <312936+JudahGabriel@users.noreply.github.com>
Co-authored-by: JudahGabriel <312936+JudahGabriel@users.noreply.github.com>
Co-authored-by: JudahGabriel <312936+JudahGabriel@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix issue with multiple versions of Lit loading on app report page Fix multiple Lit versions warning on app-report page Oct 6, 2025
@Copilot Copilot AI requested a review from JudahGabriel October 6, 2025 21:13
Copilot finished work on behalf of JudahGabriel October 6, 2025 21:13
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.

[BUG Bash 8-25] Multiple versions of Lit being loaded on app report page
2 participants
0