Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
PWA: problemas de los trabajadores de servicio

Hola, he estado tratando de aprender PWA y tengo un problema con los trabajadores de servicio, básicamente cuando intento auditar a través de Lighthouse, aparece el siguiente error:

 Service Worker not registered: Failed to register a ServiceWorker for scope ('http://127.0.0.1:5500/') with script ('http://127.0.0.1:5500/sw.js')

Aunque cuando inicio la aplicación, dice que se ha activado y se está ejecutando en la pestaña Aplicación en devtools. La información que registro en la consola también la muestra como registrada.

Editar: estoy registrando la siguiente información en la consola si ayuda.

 ServiceWorkerRegistration active: ServiceWorker {scriptURL: 'http://127.0.0.1:5500/sw.js', state: 'activated', onstatechange: null, onerror: null} backgroundFetch: BackgroundFetchManager {} cookies: CookieStoreManager {} installing: null navigationPreload: NavigationPreloadManager {} onupdatefound: null paymentManager: PaymentManager {instruments: PaymentInstruments, userHint: ''} periodicSync: PeriodicSyncManager {} pushManager: PushManager {} scope: "http://127.0.0.1:5500/" sync: SyncManager {} updateViaCache: "imports" waiting: null [[Prototype]]: ServiceWorkerRegistration

También registro el trabajador del servicio en un nombre de archivo app.js como este:

 if('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js') .then((reg) => console.log('Service Worker registered.', reg)) .catch((err) => console.log('Service Worker not registered.', err)); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!