-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
BUILD: [vite-plugin-remix-pwa:virtual-entry-sw] Could not load virtual:entry-sw #147
Comments
Hello @Magzter, does this occur on build? I think I've spotted the error, remix pwa is attempting to build before remix has finished building. Is your remix pwa plugin after remix plugin in your Vite config? |
@Hey @ShafSpecs , it is after, below is a copy of the vite configuration. The error does occur on build.
|
The error only throws on build, right? I would have to check that out. Seems like a bug, do you have a reproduction? |
On both dev and prod builds, I've got around it at the moment by manually putting an entry.worker.js file in public to continue playing with other PWA features. I've just jumped into bed but will work on getting you an easily cloned reproduced project tomorrow. |
@ShafSpecs I managed to figure it out as I was deleting stuff in the reproduce project but it looks like it fails at some sort of duplicate import lint/vite rule? However my normal Vite build doesn't throw any errors with the pwa plugin removed. https://github.com/Magzter/remix-pwa-build-bug If you uncomment one of the imports at my-remix-app/app/routes/_index.tsx:7 and run build you will reproduce the error. Maybe whatever vite build error happens needs to be passed through to the CLI? |
Thanks, it's 2am here so won't be able to check it out for a few hours 😄. |
Looking at the file, you seem to have imported them before. If I uncomment, you would end up importing twice |
Yes but it doesn't throw an error on my build with the PWA plugin removed and the error thrown by PWA plugin is not clear as to what the build error is. I don't mind the error as it's given me a chance to clean it up but I wouldn't have found it had I not created a new project and removed stuff xD You can see that by uncommenting the double import and commenting out the pwa plugin then running build. I haven't done anything to configure build rules just using remix out of the box. |
Hey guys, running a relatively new remix project and have been struggling with this error for the last few days.
This is after following the basic instructions at: https://remix-pwa.run/docs/main/quick-start
It seems to fail to build the worker file but I haven't been able to make sense of this error, I've tried multiple machines (ubuntu/Mac) and node versions (node 18/20) but it consistently produces this.
I've tried following the runtimes guideline to do my own runtime instead but produces the same error.
Package.json
The text was updated successfully, but these errors were encountered: