nuxt error: WARN Cannot stringify a function renderRangeError Maximum call stack size exceeded solution

Reason: Nuxt serializes state from the server to the client, that is, transfers state from asyncData, data, and vuex storage states from the server to the client. The package causing this error is @nuxt/devalue used by Nuxt. To solve this problem, make sure state is a normal object.

undefined, Functions, and Symbols are not valid JSON values. If any such values ​​are encountered during conversion, they are either omitted (when found in an object) or changed to null (when found in an array)

solve:

data() {

    if(process.browser){

      Object.assign(this, { //Only injected on the client side

        XLSX,

        Swiper})

    }

    return {

      type: "",

    };

  }

おすすめ

転載: blog.csdn.net/qq_42152032/article/details/132888550