Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BernardoSM opened this issue Feb 20, 2024 · 1 comment
Open

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

BernardoSM opened this issue Feb 20, 2024 · 1 comment

Comments

@BernardoSM
Copy link

BernardoSM commented Feb 20, 2024

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: yarn@1.22.19
  • 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/nuxt@0.5.0
  • 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: yarn@1.22.21
  • 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)
@BernardoSM
Copy link
Author

Hi guys, I have updates. I updated my github runner to macos-14 and isn't showing the error anymore. The bad part is that we can't use macos-14, we have a self hosted runner that works on ubuntu-latest, so we need to get this fix for ubuntu.

GH Action on macos-14 that doesn't show the error:

  • 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: yarn@1.22.19
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

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

No branches or pull requests

1 participant