digital ocean next pwa show this error "Does not register a service worker that controls page and start_url"

32 Views Asked by At

in localhost:3000 pwa work fine for next js. but when i try to deploy my frontend in digital ocean, it show this error "Does not register a service worker that controls page and start_url". in next.config.js file

/** @type {import('next').NextConfig} */

const withPWA = require("next-pwa")({
    dest: "public",
    register: true, 
});

const nextConfig = withPWA({
    // next config
    reactStrictMode: true,
   
});


module.exports = nextConfig;

how can i solve this kind of error for next js pwa. my localhost and digital ocean droplet version is same node js: v18.15.0 npm : 9.5.0 next js version: 13.2.3

i try to downgrade next js version, but it not solve my issue, but in different deployment website like netlify or vercel, pwa work fine, but show api/v1/* 405 method not allowed

0

There are 0 best solutions below