Skip to content

Error: Dynamic require of "workbox-build" is not supported #667

@BernardoSM

Description

@BernardoSM

My local computer config that doesn't show the error below: ✅

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.10.2
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • User Config: ssr, spaLoadingTemplate, nitro, experimental, components, imports, app, build, sourcemap, dev, runtimeConfig, css, vite, postcss, modules, eslint, pwa
  • Runtime Modules: @nuxtjs/eslint-module@^4.1.0, ./modules/auto-import-eslint.ts, @pinia/nuxt@^0.4.6, @pinia-plugin-persistedstate/nuxt@^1.0.0, @vite-pwa/[email protected]
  • Build Modules:
  • Vite: vite/5.1.1 darwin-arm64 node-v20.9.0

My gh actions config that shows the error below: 🚨

  • Operating System: Linux
  • Node Version: v20.9.0
  • Nuxt Version: 3.10.2
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -
Error:  Dynamic require of "workbox-build" is not supported
  at /data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/vite-plugin-pwa/dist/chunk-UB6OAFZF.js:6:9
  at loadWorkboxBuild (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/vite-plugin-pwa/dist/index.js:300:12)
  at async Promise.all (index 0)
  at async generateInjectManifest (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/vite-plugin-pwa/dist/index.js:356:30)
  at async _generateSW (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/vite-plugin-pwa/dist/index.js:478:5)
  at async Object.generateSW (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/vite-plugin-pwa/dist/index.js:581:14)
  at async regeneratePWA (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/@vite-pwa/nuxt/dist/module.mjs:108:3)
  at async /data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/@vite-pwa/nuxt/dist/module.mjs:291:11
  at async /data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/nuxt/dist/index.mjs:3295:7
  at async build (/data/runners/one/_work/apps-monorepo/apps-monorepo/node_modules/nitropack/dist/shared/nitro.4ea992bc.mjs:2334:3) 

Error:  Dynamic require of "workbox-build" is not supported
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error:  command finished with error: command (/data/runners/one/_work/apps-monorepo/apps-monorepo/apps/pay) /tmp/yarn--1708439830980-0.8439479944659141/yarn run build exited (1)
Error: pay#build: command (/data/runners/one/_work/apps-monorepo/apps-monorepo/apps/pay) /tmp/yarn--1708439830980-0.8439479944659141/yarn run build exited (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions