Skip to content

Loading 3rd party scripts for unused widget #882

Description

@gregor-tusar

I run into an issue where loading a 3rd party widget fails in Gitlab job where the access to the internet is limited. The script that fails if used by a widget that is not used in the app at all. Would it be possible to not even load the 3rd party scripts if they are not referenced by the solution?

System:
@nuxt/scripts: 1.3.6
docker build in Gitlab actions
node:22.23.2

Here is the build output:

[@nuxt/scripts] ℹ Downloading script https://secure.gravatar.com/js/gprofiles.js → d1133547e8a1f280.js (21.38 kB br)
✓ 4471 modules transformed.

 ERROR  ✗ Build failed in 15.01s

│
■  Nuxt build error: Error: Build failed with 1 error:
│
│  [plugin nuxt:scripts:bundler-transformer] /src/src/MySolution/node_modules/@nuxt/scripts/dist/runtime/components/ScriptCalendlyInlineWidget.vue
│  FetchError: [GET] "https://assets.calendly.com/assets/external/widget.js": <no response> fetch failed
│      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
│      at async $fetchRaw2 (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async $fetchRaw2 (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async $fetch2.$fetchRaw2 [as raw] (file:///src/src/MySolution/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs:286:14)
│      at async downloadScript (file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1137:11)
│      at async file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1382:40
│      at async TransformPluginContextImpl.handler (file:///src/src/MySolution/node_modules/@nuxt/scripts/dist/module.mjs:1451:13)
│      at async plugin (file:///src/src/MySolution/node_modules/rolldown/dist/shared/bindingify-input-options-COG1sboO.mjs:1537:16)
│      at async plugin.<computed> (file:///src/src/MySolution/node_modules/rolldown/dist/shared/bindingify-input-options-COG1sboO.mjs:2125:12)
│  Caused by:
│    TypeError: fetch failed
│    Caused by:
│      Error: read ECONNRESET
│          at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)
ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

Activity

  1. added
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Aug 29, 2026
  2. harlan-zw commented on Aug 31, 2026

    @harlan-zw
    Collaborator

    🤖 ISSUE TRIAGE

    Harlan Agent Kit posted this automated triage. It is not Harlan's personal assessment or commitment. AI open source policy.

    • Route: Wait to implement
    • Difficulty: 3/5
    • Impact: 3/5
    • Reproduction: Yes
    • Codebase review: Not needed
    • Summary: Builds in restricted-network CI fail because the bundler-transformer downloads third-party SDKs for scripts/components not referenced by the app (e.g. ScriptCalendlyInlineWidget.vue). The checked-out default branch exposes assets.fallbackOn
    • Next action: Do not start new implementation; review and merge PR fix: skip script downloads for unused components #884 (fix/unused-widget-script-download), verify CI passes, then close Loading 3rd party scripts for unused widget #882 with the release.
  3. added
    harlan-agent-wait-to-implementIssue triage found work that should wait before implementation.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    harlan-agent-wait-to-implementIssue triage found work that should wait before implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions