nuxt-community / vuetify-module

Vuetify Module for Nuxt 2
Other
627 stars 106 forks source link

Nuxt shows "Module Error" when compiling after adding vuetify module #293

Open junyussh opened 4 years ago

junyussh commented 4 years ago

Module version The version of the module you're using. "@nuxtjs/vuetify": "^1.11.0"

Describe the bug I installed vuetify module manually after initializing my Nuxt project and I followed the instructions on Vuetify document.

npm install @nuxtjs/vuetify -D

Add '@nuxtjs/vuetify', in buildModules on nuxt.config.js, then I got this error.

圖片

To Reproduce I met another error when building sandbox, so I can't show it on Sandbox. I use codesandbox-nuxt template to create box and use npm to install the module.

圖片

Expected behavior It should compiled succeed without errors.

Screenshots

圖片

Additional context

My nuxt.config.js:

export default {
  mode: 'universal',
  /*
   ** Headers of the page
   */
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      {
        hid: 'description',
        name: 'description',
        content: process.env.npm_package_description || ''
      }
    ],
    link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
  },
  /*
   ** Customize the progress-bar color
   */
  loading: { color: '#fff' },
  /*
   ** Global CSS
   */
  css: [],
  /*
   ** Plugins to load before mounting the App
   */
  plugins: [],
  /*
   ** Nuxt.js dev-modules
   */
  buildModules: [
    // Doc: https://github.com/nuxt-community/eslint-module
    '@nuxtjs/vuetify',
    '@nuxtjs/eslint-module',
  ],
  /*
   ** Nuxt.js modules
   */
  modules: [],
  /*
   ** Build configuration
   */
  build: {
    /*
     ** You can extend webpack config here
     */
    extend(config, ctx) {}
  }
}

And this is my source code: https://github.com/junyussh/Nuxt-test

junyussh commented 4 years ago

I found that is prettier's problem. I fix the errors manually and it can run.