繁体   English   中英

如何使用 nuxtjs 配置 vuetify 以部署在 Google App Engine 上

[英]How can I config vuetify with nuxtjs to deploy on Google App Engine

我正在尝试使用 nuxtjs 和 vuetify 在 App Engine 上运行,但出现此错误:错误:找不到模块“vuetify/es5/util/colors”

package.json

"dependencies": {
    "nuxt": "2.14.5"
  },
  "devDependencies": {
    "@nuxtjs/vuetify": "^1.11.2",
}

nuxt.config.js

import colors from 'vuetify/es5/util/colors'

export default {
    buildModules: [
        '@nuxtjs/vuetify',
    ],

    vuetify: {
        theme: {
            dark: true,
            themes: {
                dark: {
                    primary: colors.blue.darken2,
                    accent: colors.grey.darken3,
                    secondary: colors.amber.darken3,
                    info: colors.teal.lighten1,
                    warning: colors.amber.base,
                    error: colors.deepOrange.accent4,
                    success: colors.green.accent3,
                },
            },
        },
    },
}

错误:错误:找不到模块'vuetify/es5/util/colors'

我发现的解决方案是将 nuxtjs/vuetify 从 devDependencies 移动到 dependencies

在此处输入图像描述

是的,从 devDependencies 转移到这样的依赖关系。 我希望,它会为你工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM