Skip to content
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

Example is missing sw.js/dev-sw.js/dev-sw.js?dev-sw #69

Open
danieldanielecki opened this issue Sep 26, 2023 · 7 comments
Open

Example is missing sw.js/dev-sw.js/dev-sw.js?dev-sw #69

danieldanielecki opened this issue Sep 26, 2023 · 7 comments

Comments

@danieldanielecki
Copy link

Based on the logs I receive in my current project

[Vue Router warn]: No match found for location with path "/dev-sw.js?dev-sw"
[Vue Router warn]: No match found for location with path "/dev-sw.js"

and #54, #57, it'd be very beneficial to have the service worker file in the example. It'd clarify lots of doubts.

@lovkyndig
Copy link

Maybe it's a bug in dev-mode. I get rid of the warnings with moving .nuxt/dev-sw-dist-files to the public-folder.

@danieldanielecki
Copy link
Author

I'm not finding this file in my .nuxt.

Screenshot 2023-11-15 at 20 12 18

@lovkyndig
Copy link

lovkyndig commented Nov 15, 2023

This folder is created on yarn dev or whatever dev you use, but not right away.
You will not see the folder popping up before you open the browser:)

I mean; open .nuxt in the File Explorer and the run dev; then you see the dev-sw-dist popping up when you open the browser.

@userquin
Copy link
Member

nuxt/cli#188

@rogadev
Copy link

rogadev commented Jan 19, 2024

This bug was so frustrating that I've decided to uninstall this package. However, removing the package leaves the bug behind. Wondering if anyone has figured out how to remove the problems from this package. This is such a headache.

[Vue Router warn]: No match found for location with path "/dev-sw.js?dev-sw"
[Vue Router warn]: No match found for location with path "/dev-sw.js"

@userquin
Copy link
Member

userquin commented Jan 19, 2024

You need to uninstall the sw from the browser and run nuxt prepare (will rebuild the .nuxt folder and remove previous files including the dev-sw.js file).

@rogadev
Copy link

rogadev commented Jan 19, 2024

It looks like it was actually a browser service worker that kept haunting me. Forgive the broken screenshot (Microsoft Windows problem 🤷‍♂️) but here's what it looks like if anyone finds themselves with the same issue and is unsure how to solve it after uninstalling this package.
service worker unregister fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants