Pwa-module: Getting error [ TypeError: getRouteParams is not a function ] for @nuxtjs/pwa

Created on 19 Feb 2019  ยท  11Comments  ยท  Source: nuxt-community/pwa-module

## nuxt.config.js

  /*
   ** Nuxt.js modules
   */
  modules: [
    ['@nuxtjs/pwa', {
      icon: false
    }]
  ],

run command

npm run dev

get error

> nuxt

i Preparing project for development                                                                                                                                                                          10:38:16
i Initial build may take a while                                                                                                                                                                             10:38:16

 FATAL  getRouteParams is not a function                                                                                                                                                                     10:38:16

  at ModuleContainer.addManifest (node_modules\@nuxtjs\manifest\index.js:18:38)
  at hook (node_modules\@nuxtjs\manifest\index.js:7:17)
  at ModuleContainer.nuxtManifest (node_modules\@nuxtjs\manifest\index.js:11:12)
  at Promise (node_modules\@nuxt\core\dist\core.js:172:30)
  at new Promise (<anonymous>)
  at ModuleContainer.addModule (node_modules\@nuxt\core\dist\core.js:170:12)
  at ModuleContainer.requireModule (node_modules\@nuxt\core\dist\core.js:121:17)
  at module (node_modules\@nuxtjs\pwa\index.js:7:17)
  at promise.then (node_modules\@nuxtjs\pwa\index.js:1:146)
  at process._tickCallback (internal/process/next_tick.js:68:7)


   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                                 โ”‚
   โ”‚   โœ– Nuxt Fatal Error                            โ”‚
   โ”‚                                                 โ”‚
   โ”‚   TypeError: getRouteParams is not a function   โ”‚
   โ”‚                                                 โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

npm ERR! code ELIFECYCLE
npm ERR! errno 1

This question is available on Nuxt community (#c98)

Most helpful comment

this problem went away for me after updating nuxt to the latest stable version

All 11 comments

This issue as been imported as question since it does not respect pwa-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/pwa-module/issues/c98.

Same issue there...

@kennydorion feel free to file a correct bug report then.

this problem went away for me after updating nuxt to the latest stable version

Same for me, while I updated the nuxt to latest version, but still it happens!

@wemod123 Try cleaning up yarn.lock and node_modules. This may be a yarn failure

@pi0
I had try your suggestion: remove yarn.lock, and node_modules, and install all modules with fresh repo.
But still same error happend as this issue title told.

I go through the install process strictly follow the guide here: https://pwa.nuxtjs.org/setup.html

Suggest repopen this issue.

@wemod123 Please provide a reproduction @wemod123

I just create a sample repo, please have a check:
https://github.com/wemod123/nuxt-pwa-sample

same problem
nuxt version: 2.2.6 ~ 2.4.5
@nuxtjs/pwa version: v3.0.0-beta.1 ~ v3.0.0-beta.10

The known edge case should not happen anymore with 3.0.0-beta.11

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsimenis picture tsimenis  ยท  5Comments

TannerGilbert picture TannerGilbert  ยท  7Comments

memic84 picture memic84  ยท  5Comments

lihbr picture lihbr  ยท  4Comments

akirarika picture akirarika  ยท  4Comments