question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Components loading failing with using the content module

See original GitHub issue

Describe the bug

In dev mode all works. But nuxt generate and nuxt build failed with the error

  • If a component is registered in the page it will work fine
  • issue with autoloaded components only
  • I solved this issue for myself. I added in package.json “@nuxt/components”: “2.1.8”

To Reproduce Steps to reproduce the behavior:

  1. Clone repository https://github.com/kalinichenko88/nuxt-components-bug
  2. Run npm i
  3. Run npm run generate
  4. See error Error: render function or template not defined in component: tutorial

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
pi0commented, Aug 16, 2021

Thanks for reproduction @kalinichenko88. Just remove package-lock.json (or yarn.lock) and reinstall dependencies. The issue is fixed in v2.2.1.

2reactions
rchlcommented, Aug 13, 2021

I’m using undocumented components: { loader: true } in my nuxt-config and with that the https://github.com/nuxt/components/releases/tag/v2.2.0 appears to have a breaking change. Most likely due to:

  • explicit async loading (#212) (5adefb9)

Even more annoying that it doesn’t trigger in development so the issue is only discovered after deploying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load component from module error After using ...
The important part for this issue is that in order to include all of the required app pages and custom components, the bundle...
Read more >
Lazy loading React components - LogRocket Blog
In this tutorial, we'll show you how lazy loading works in React.js, demonstrate how to apply code-splitting and lazy loading using ...
Read more >
How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >
Manually Lazy Load Modules And Components In Angular
Based on this configuration data, multiple modules and/or components need to be lazy-loaded and its routes dynamically added to the application. In this...
Read more >
Code-Splitting - React
If the other module fails to load (for example, due to network failure), it will trigger an error. You can handle these errors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found