Getting error when I run npm run server on Vue JS project

1.7k Views Asked by At

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
1

There are 1 best solutions below

1
RizwanTariq On BEST ANSWER

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/cli-plugin-pwa@4 this will install latest release of version 4