pwa icon indicating copy to clipboard operation
pwa copied to clipboard

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

Open andrisole92 opened this issue 8 years ago • 5 comments
trafficstars

When running npm test

andrisole92 avatar Jun 04 '17 18:06 andrisole92

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.

CodinCat avatar Jun 05 '17 06:06 CodinCat

No, I am still getting an error.

andrisole92 avatar Jun 06 '17 21:06 andrisole92

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

ragingwind avatar Jun 06 '17 21:06 ragingwind

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.

addyosmani avatar Jun 24 '17 17:06 addyosmani

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

default-writer avatar Jun 28 '17 17:06 default-writer