Updating Nuxt to the latest version 2.7 and encountering a constant refresh loop

I am currently in the process of transferring a Nuxt.js project from

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7739020f0337465943">[email protected]</a>
to version 2.7. After updating the Webpack configuration as required, I have encountered the following issue.

Whenever I attempt to navigate to any page on the website, I am met with the default Nuxt loading screen displaying bundling progress, which then continuously refreshes without making any progress. The application remains stuck at this loading screen and the tab title continuously displays Nuxt.js: Loading app....

There are no visible errors in the console or during compilation, but upon inspecting the Network tab in devtools, I notice a failed (HTTP 500) request to localhost:3000. The response payload for this error reads:

NuxtServerError
render function or template not defined in component: NuxtLoading

Upon investigating NuxtLoading, I found a file named nuxt-loading.vue within the .nuxt folder. This file appears to be a fully functional component with a render() method implemented as follows:

render(h) {
    let el = h(false)
    if (this.show) {
      el = h('div', {
        staticClass: 'nuxt-progress',
        class: {
          'nuxt-progress-notransition': this.skipTimerCount > 0,
          'nuxt-progress-failed': !this.canSucceed
        },
        style: {
          'width': this.percent + '%',
          'left': this.left
        }
      })
    }
    return el
  }

Actions Taken:

  • Reinstallation of node_modules;
  • rm -rf .nuxt && yarn dev (EDIT: along with yarn.lock);
  • Upgrade of element-ui to the latest version.

Thank you in advance for any assistance provided. Feel free to ask for any additional information if needed.

Answer №1

Your i18n loader configuration is incorrect. It should be set up like this:

config.module.rules.push({
      resourceQuery: /blockType=i18n/,
      type: 'javascript/auto',
      loader: '@kazupon/vue-i18n-loader'

  });

Alternatively, you can utilize the nuxt-i18n module, which will handle this setup for you through the vueI18nLoader option.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it necessary to use the prefix meteor when incorporating npm with Meteor?

When I am working on Meteor 1.3 projects, is it necessary to always prepend meteor before npm? The Meteor documentation and code examples seem to offer different approaches. I believe that the recommended practice is: $ meteor npm install --save some-pac ...

Mastering all changes to the 'src' attribute in the DOM

I am currently coding in Javascript and trying to implement a feature that monitors new 'script' elements and blocks specific sources. I have experimented with using MutationObserver and __defineSetter__, both of which can monitor changes to the ...

What is the best way to locate all data attributes associated with a chosen HTML option?

Is it possible to retrieve all properties such as data-name="", data-client="" for a chosen option within a select element? I am looking to create an array/object/JSON Object with information stored in data properties: <option da ...

The attempt to create the module Application was unsuccessful because of an error stating that the module 'Application' is not accessible

While attempting to utilize fiddle from http://jsfiddle.net/animaxf/uXbn6/4779/, I encountered an issue. When forking the fiddle, it functions correctly. However, when copying and creating a new application (as seen at: http://jsfiddle.net/rishi007bansod/a ...

Unexpected Error with Background Position Variable

Hello, I am attempting to create an animated background effect that moves up and down using the .animate() and .hover() methods in jQuery. Within my DOM, there is a div with id="#menu" containing a UL list where each item has a background positioned at dif ...

Converting HTML5 FormData object to raw payload using frontend javascript: A Step-by-Step Guide

Can anyone help me with extracting the entire POST request payload stream in my browser side script? I am facing difficulty when the body is a FormData object, especially containing a file blob. Is there a convenient way to achieve this? The main purpos ...

How to utilize a class method within a React component

In my model.js file, I have defined several classes such as Piece, Brick, and Dashboard: export class Piece { constructor(name, coordinate) { this.name = name; this.coordinate = coordinate; this.move = false; } init(){ // some stuff ...

Creating an iOS smart banner similar to Facebook's without using the meta apple-itunes-app tag can be achieved by implementing custom

Is there a way to create a smart banner similar to what is seen on Facebook? I'm looking for something that doesn't have a close button and appears more condensed compared to the banners I've created. I found some information on this link. ...

How can I extract an array of objects from an array of arrays containing objects?

Here is the array I am currently working with: let findAllSegmentProjectMediaFilesXref = [ { it: 0, bt: 0, items: [ { mute: false, startPosition: 10, endPosition: 20, ...

Choose the element highlighted in the tab

Are there any CSS or jQuery selectors that specifically target elements that have been focused on using the tab key, similar to how anchor tags and form elements are commonly targeted? ...

Encountering difficulties in transferring bulky files with the request module in Node.js

When working on a Node.js project, I encountered an issue with transferring files from the computer to the server. While I am able to successfully send files that are up to 2mb in size, larger files fail to upload. Here is the code snippet I am using: var ...

Oops, the element type specified is not valid. Make sure to use a string for built-in components when working with NextJs

I am incorporating SVG's as a component in my nextjs application, but I encounter the following error message: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. ...

Using TypeScript to send state through history.push({...})

I recently utilized the history.push method to redirect to a specific URL while passing along some information through the included state. Here's how I implemented it: const history = useHistory() history.push({ pathname: '/someurl/', ...

Experiencing issues with organizing and displaying data using backbone.js

Experiencing some issues with sorting and displaying data using backbone.js. The collection is sorted by 'title' in the comparator function, but when rendering begins, the views of models are displayed in a different order. var TodoList = Ba ...

Retrieve the data contained within a displayed embed tag that includes a src attribute

Can anyone provide guidance on how to retrieve the content of an embed tag using src attribute? I have an embed tag pointing to a custom page as src. I tried to use jquery to access the rendered content but I am not getting anything back. Any suggestions ...

Tips for successfully incorporating PHP dynamic parameters separated by commas into a JavaScript onclick function

How can I pass PHP dynamic parameters separated by commas to a JavaScript onclick function? Can someone assist me with the correct solution? The code below is not working as expected. echo "<td><a href='#' onclick='editUser(". $row ...

Tips for concealing Bootstrap 5 modal exclusively after successful completion

Utilizing the power of Bootstrap 5 I have successfully implemented a modal that shows up when #truck_modal is clicked, thanks to the following JavaScript code: (this snippet is located at the beginning of my js file) document.addEventListener('DOMCo ...

How to Load a Custom Page with Parameters from a Different Custom Page in Wordpress

I'm completely new to the world of Wordpress, PHP and AngularJS, so please bear with me as I try to figure this out. Currently, I have two custom pages that I'll refer to as page-A and page-B. My goal is to click on a link from page-A and have ...

Display the element only if the value of the data attribute in the select option matches

Utilized HTML along with VueJS to display a div when the value is "two", and it is functioning correctly. Now, the objective is to use the data attribute - data-is-valid, to show div elements. If data-is-valid is set to true, then the div element should b ...

Troubleshooting problems with angular 4 involving node-rdkafka, kafka-node, and loading

As someone new to web front-end development, I find myself a bit overwhelmed by the JS/Node/Angular world, especially when it comes to loading kafka client libraries. I've been exploring two options for accessing my kafka cluster: node-rdkafka and kaf ...