-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property 'workbox' does not exist on type 'Window & typeof globalThis'.ts(2339) #497
Labels
bug
Something isn't working
Comments
Could you please describe the context of the code that you're getting this error from? |
You can install this package: @types/workbox-window. Then, you should create a folder named import { Workbox } from 'workbox-window';
declare global {
interface Window {
workbox: Workbox
}
} |
Im still getting the same error in the ts-config and i did what you had suggested @raphaeldevs |
Can you show the error? @LyghtCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.0next
: 13.5.6The text was updated successfully, but these errors were encountered: