Skip to content

Property 'workbox' does not exist on type 'Window & typeof globalThis'.ts(2339) #497

@alirezas

Description

@alirezas

Summary

How can I fix this typescript issue? I'm getting this error in the code below:

if ( typeof window !== "undefined" && "serviceWorker" in navigator && window.workbox !== undefined )

Property 'workbox' does not exist on type 'Window & typeof globalThis'.ts(2339)

Versions

  • next-pwa: ^5.6.0
  • next: 13.5.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions