Search code examples
node.jsvue.jsvue-clivue-pwa

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


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

Solution

  • 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