Closed shiftrtech closed 3 years ago
When i try to build my app (next build) im getting this error:
next build
> [PWA] Compile client (static) > [PWA] Custom worker found: /opt/build/repo/worker/index.ts > [PWA] Build custom worker: /opt/build/repo/public/worker-GVGQNiF3aTWRHWnczwV6T.js > [PWA] Auto register service worker with: /opt/build/repo/node_modules/next-pwa/register.js > [PWA] Service worker: /opt/build/repo/public/sw.js > [PWA] url: /sw.js > [PWA] scope: / > [PWA] Fallback to precache routes when fetch failed from cache or network: > [PWA] document (page): /_offline > [PWA] Compile server Creating an optimized production build ... .\node_modules\next\dist\compiled\webpack\bundle5.js:114742 fn: str => str.startsWith(condition) ^ TypeError: Cannot read property 'startsWith' of null
next-pwa
next
Steps to reproduce the behavior:
A successful compilation
PWA config:
module.exports = withPWA({ future: { webpack5: true }, poweredByHeader: false, pwa: { disable: process.env.NODE_ENV === 'development', dest: 'public' }, })
This more about next than next-pwa see
Summary
When i try to build my app (
next build
) im getting this error:Versions
next-pwa
: ^5.2.21next
: ^10.2How To Reproduce
Steps to reproduce the behavior:
next build
Expected Behaviors
A successful compilation
Additional Context
PWA config: