content: "resolveRouteComponents is not defined" on $router.push

Version

@nuxt/content: 1.3.1 nuxt-edge: 2.13.0-26519060.8933d375

Using target: static and ssr: true in nuxt config.

Reproduction Link

Tried to fork this to create one: https://codesandbox.io/s/nuxtcontent-demo-l164h But before I changed anything on codesandbox fails with “Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open ‘/sandbox/node_modules/html-entities/lib/index.js’” error.

Anyway, if it would not fail it would be probably something like this: https://codesandbox.io/s/nuxtcontent-demo-dgfy5

Steps to reproduce

If i use this.$router.push() from a method for example triggered by a click event, it shows a 500 error page with the text of “resolveRouteComponents is not defined”, but just for a brief moment, then the navigation succeeds. No error was written to the console.

What is Expected?

It should not display an error page when navigating. Not even for a brief moment.

What is actually happening?

It shows a 500 error page for a 100ms or so.

nuxt_content_500

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 17 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Hi! Sorry for the inconvenience guys. Still couldn’t track down what triggered this bug (should be related to _queryChanged triggering) but the root cause is obvious. The hotfix will be landed ASAP (nuxt/nuxt.js#7591)

Hi! This should be fixed with v2.13.1.

I am not sure whoever is facing issue here do you have loading :false in nuxt.config.js? Can you try to making to loading :true ? I found this on another thread. Even in my case it did wrk I guess.

Credit goes to Davounet on this thread - https://github.com/nuxt/nuxt.js/pull/6159#issuecomment-635812142

It happens every time the Router is being used either by using the to property directly to pass the links or using the $router.push() programatically. To my project it doesn’t matter if it’s a mobile browser or not, like other people mentioned. If I downgrade to previous version of Nuxt everything works and the same error doesn’t exists.

@ianchak same issue.