vue.js - vue 3 + vuetify 3 : Unknown node type in node creation at Array. map (<匿名>)

标签 vue.js vuetify.js vuejs3

我正在从 vue2 迁移到 vue3 以及 vuetify 3。但是,我无法正确设置 vuetify 3。我收到以下错误

Syntax Error: Error: Unknown node type in node creation at Array.map (anonymous)

在以下行中:

in ./node_modules/vuetify/lib/components/VList/VListItem.css
in ./node_modules/vuetify/lib/components/VCard/VCard.css
in ./node_modules/vuetify/lib/components/VBtn/VBtn.css

我尝试通过以下链接修复它

[Bug Report][3.0.0-alpha.0] Vuetify 3 'Unknown node type in node creation' bug #14179

vuetify-loader

但没有成功。

vuetify.js:

// Styles
import "@mdi/font/css/materialdesignicons.css";
import "vuetify/styles";
import colors from "vuetify/lib/util/colors";

// Vuetify
import { createVuetify } from "vuetify";

    export default createVuetify({
      theme: {
        themes: {
          options: { customProperties: true },
          light: {
            primary: "#FF6D00",
          },
          dark: {
            primary: "#FFCA28",
          },
        },
      },
      icons: {
        iconfont: "mdi", 
      },
    });

main.js:

const app = createApp({
  data: function () {
    return {
      currentRoute: window.location.pathname,
    };
  },    
  computed: {
    ViewComponent() {
      return routes[this.currentRoute] || NotFound;
    },
  },
  render() {
    return h(this.ViewComponent);
  },
});

最佳答案

您有一个不完全支持 @supports 的旧版本的 autoprefixer (https://github.com/postcss/autoprefixer/issues/1391)。将 postcss 和 autoprefixer 更新到最新版本将修复错误。

关于vue.js - vue 3 + vuetify 3 : Unknown node type in node creation at Array. map (<匿名>),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71562299/

相关文章:

javascript - Vue 中用于 v-select 的动态组件渲染

typescript - 使用 Vue 3 Composition API 创建全局商店

date - 使用 Prop Vue3 观看

javascript - this.$refs 使用 Vue 3 选项 API 为空

javascript - 更新时如何使vuex状态更新UI?

javascript - VueJS 如何使用事件总线将数据传递给模态组件

vue.js - 注销不会从本地存储或状态中清除 token

vue.js - 如何在 Nuxt 中只从 buefy 导入 Navbar、Dropdown 和 Modal?

vuetify.js - Vuetify Combobox - 单击图标时打开下拉菜单

typescript - 如何在Vuetify.js的snackbar中显示文本字段验证检查结果?