I added PWA in this project using vue add pwa
using Vue Cli.
It installs two packages
“@vue/cli-plugin-pwa”: “~5.0.0”,
“register-service-worker”: “^1.7.2”,
But when I run npm run serve / npm run build
it’s showing bellow error.
INFO Starting development server... 0% compiling ERROR TypeError: Cannot read property 'tap' of undefined
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
There is some issue with "@vue/cli-plugin-pwa": "v5"
Downgrade @vue/cli-plugin-pwa
to "v4.5.15"
First Run npm uninstall @vue/cli-plugin-pwa
in terminal
then
Run npm i -D @vue/[email protected]
this will install latest release of version 4
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0