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

Error: ENOENT: no such file or directory, open 'D:\james\zeew-pwa\dist\service-worker.js' #34

Open
andrisole92 opened this issue Jun 4, 2017 · 5 comments
Labels

Comments

@andrisole92
Copy link

When running npm test

@CodinCat
Copy link
Contributor

CodinCat commented Jun 5, 2017

Are you using the latest pwa template? e2e should pass after #21 was merged.

I just tried with a fresh install and everything works great:

2017-06-05 2 05 23

If you generated your project a few days ago (before #21) then you might need to upgrade your template manually or simply generate a new one.

@andrisole92
Copy link
Author

No, I am still getting an error.

@ragingwind
Copy link
Contributor

ragingwind commented Jun 6, 2017

It happens because of SWPrecacheWebpackPlugin use physical fs not memfs. I think, generating service-worker.js is not necessary while e2e test. we can bypass when it times of test. thought? @addyosmani

@addyosmani
Copy link
Collaborator

Pardon the delay replying. I would be down for folks ignoring the service-worker.js in end-to-end tests but we can also explore making this work better. As @ragingwind pointed out, due to the fact we output a file to disk vs memfs, some workarounds might need to be crafted here.

@default-writer
Copy link

@addyosmani I suppose @andrisole92 needs to disable service-worker programmatically, for whose who used it incorrectly (to disable errorneus site pages cache completely):

<script> navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } }) </script>

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

No branches or pull requests

5 participants