shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.86k stars 323 forks source link

PWA not working: 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 #360

Closed manuthecoder closed 2 years ago

manuthecoder commented 2 years ago

Summary

The "Install" button isn't appearing. I tried with and without incognito, but I still get the same result image

Versions

Expected Behaviors

Just like a PWA, it should appear somewhat like this: image

Additional Context

My next.config.js:

/** @type {import('next').NextConfig} */
const withTM = require("next-transpile-modules")([
  "@fullcalendar/common",
  "@babel/preset-react",
  "@fullcalendar/common",
  "@fullcalendar/daygrid",
  "@fullcalendar/interaction",
  "@fullcalendar/react",
  "@fullcalendar/timegrid",
]);

const withPlugins = require("next-compose-plugins");
const withPWA = require("next-pwa");

module.exports = withPlugins(
  [
    [
      withTM(),
      withPWA({
        pwa: {
          dest: "public"
        }
      })
    ]
  ],
  {
    reactStrictMode: true,
    async redirects() {
      return [
        {
          source: "/",
          destination: "/dashboard",
          permanent: true
        }
      ];
    }
  }
);
manuthecoder commented 2 years ago

Never mind, I fixed it by removing some other plugins which were interfering with the PWA