No matching service worker detected. You may need to reload the page, or check that the scope of the service worker for the current page encloses the scope and start URL from the manifest.
Hello! I was trying to implement PWA in my portfolio. I got the error when I deployed to Vercel. I like to mention that the PWA is working fine in the localhost
Here is my Chrome dev console. Also, I'm getting the Uncaught (in promise) TypeError: Failed to fetch this error.

I'm using Next JS (version: ^13.1.1) and next-pwa (version: ^5.6.0)
Here is my next.config.js file
const runtimeCaching = require("next-pwa/cache");
const withPWA = require("next-pwa")({
dest: "public",
register: true,
dynamicStartUrl: false,
skipWaiting: true,
runtimeCaching,
buildExcludes: [
/middleware-manifest\.json$/,
/_middleware\.js$/,
/_middleware\.js\.map$/,
/middleware-runtime\.js$/,
/middleware-runtime\.js\.map$/,
],
});
const nextConfig = withPWA({
// next config
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "i.ibb.co",
pathname: "/**",
},
],
},
});
module.exports = nextConfig;
Can anyone help me to get rid of this problem?
@imRHB It seems this repo is dead and the maintainer cannot be contacted for so long now. I've made an immediate response by resurrecting this repo ImBIOS/next-pwa.
I am facing the same issue but I am using next js 13 app directory. Which, I think is not compatible with next-pwa currently.
I am facing the same issue as well
It's working with the pages directory setup but not with app directory.
I am using a fork of the main repository https://github.com/DuCanhGH/next-pwa this has fixed the registration issue. I am testing it for fallback which I think is not working correctly.