Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

250
Visualizações
No matching service worker error on react app

I have a react app and trying to add PWA functionality to it, I have added manifest.json in the public folder and serviceWorker.js in the src folder.

When I deploy the app on netlify I get an error when checking the manifest file in chrome dev tools in the application section.

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.

My manifest.json

{
    "theme_color": "#f493cf",
    "background_color": "#f6f6f6",
    "display": "standalone",
    "scope": "/",
    "start_url": "/",
    "name": "Emily tasks",
    "short_name": "Emily tasks",
    "description": "Emily taks",
    "icons": [
        {
            "src": "/icon-192x192.png",
            "sizes": "192x192",
            "type": "image/png"
        },
        {
            "src": "/icon-256x256.png",
            "sizes": "256x256",
            "type": "image/png"
        },
        {
            "src": "/icon-384x384.png",
            "sizes": "384x384",
            "type": "image/png"
        },
        {
            "src": "/icon-512x512.png",
            "sizes": "512x512",
            "type": "image/png"
        }
    ]
}

and in index.js in the src folder I have imported serviceWorker and called its register() function.

`import * as serviceWorker from './serviceWorker';

serviceWorker.register();

Currently the serviceWorker.js file is just standard as when it was created when I made the CRA app.

My current folder structure is as follows

-node_modules
-public
--index.html
--manifest.json
-src
--index.js
--serviceWorker.js
-package.json

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda