Closed Edmund1645 closed 5 years ago
also I noticed that a service-worker.js
file that does nothing is generated in the root directory, and the content of that file keeps duplicating any time I run build.
Please share minimum reproducible repository.
Please share minimum reproducible repository.
I don't understand please, like a link to my repository where the entire project is?
Yes. If you don't want to, you may reproduce the error in minimum possible files, upload to github and share it here. Thanks!
This has been noted here: https://github.com/gridsome/gridsome/issues/167#issuecomment-516840467
You can see my manifest.json and see that an icon is generated for every image on my site, rather than just the icon I specify in my gridsome.config.js
Hi @Edmund1645 and @IHIutch, I have pushed the patch with the fix. let me know if it is a issue anymore.
Looks like its working to me :)
Hi,
I have spent some time trying to debug this, but don't know what i could do more.
After $ npm install gridsome-plugin-pwa
and configuringgridsome.config.js
i get this error on
$ gridsome develop
:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.isAbsolute (path.js:1144:5)
code is : here
The location you set to your icon has to be absolute, so it should start with static/
In addition, @dizid you may open a new issue for this as this issue isn't related to your problem.
Thank you @Edmund1645 I have tried dozens of variations and location, same error. with a ./ and without, different file locations etc.
@rishabh3112 I have been solving a few different issues for 2 days now, time to move on.
I ran
gridsome build
to see how the directories look after building for production because I noticed that I don't get the dialog to 'add to homescreen', An array of all images in src is what's passed as icons instead of the one I put in/static
sample of
manifest.json
filewhat i specified in
gridsome.config.js
I also changed how I linked to the icon but that still gave the same result.