nuxt-community / vuetify-module

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

nuxtjs/vuetify (1.12.3) - Not working due to sass loader issue #515

Open RosarioPoulraj opened 1 year ago

RosarioPoulraj commented 1 year ago

I have installed the latest version of nuxtjs/vuetify (1.12.3) and running into an issue with sass loader for the past several hours. Even after installing the latest versions of sass and sass-loader, still the same error persists. My package.json snapshot for different packages (with their versions) given below.

ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'sass') 06:55:45

at Object.setupFont (C:/workspace/HealingApp/node_modules/@nuxtjs/vuetify/dist/font.js:16:43) at C:/workspace/HealingApp/node_modules/@nuxtjs/vuetify/dist/index.js:10:51 at /C:/workspace/HealingApp/node_modules/hookable/dist/index.mjs:39:82 at async build (/C:/workspace/HealingApp/node_modules/nuxt/dist/index.mjs:2198:3) at async Promise.all (index 1) at async load (/C:/workspace/HealingApp/node_modules/nuxi/dist/chunks/dev.mjs:6785:9) at async Object.invoke (/C:/workspace/HealingApp/node_modules/nuxi/dist/chunks/dev.mjs:6839:5) at async _main (/C:/workspace/HealingApp/node_modules/nuxi/dist/cli.mjs:50:20)

"devDependencies": { "@nuxtjs/tailwindcss": "^6.1.3", "@nuxtjs/vuetify": "^1.12.3", "autoprefixer": "^10.4.13", "axios": "^1.1.3", "css-loader": "^6.7.3", "deepmerge": "^4.2.2", "file-loader": "^6.2.0", "node-sass": "^8.0.0", "nuxt": "3.0.0-rc.13", "postcss": "^8.4.19", "style-loader": "^3.3.1", "tailwindcss": "^3.2.4"

"dependencies": { "sass": "^1.57.0", "sass-loader": "^13.2.0",

Note : Nuxt was working fine till the installation of "@nuxtjs/vuetify".

Kindly guide in this regard. Thanks in advance.

RosarioPoulraj commented 1 year ago

at Object.setupFont (C:/workspace/HealingApp/node_modules/@nuxtjs/vuetify/dist/font.js:16:43)

The above mentioned line in the error points to the following line in the file named "font.js" const sass = this.options.build.loaders.sass;

So I have also added the CSS for the Roboto font in the nuxt.config.js as below. export default defineNuxtConfig({

link: [ { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto&display=swap' }, ],

css: [ "assets/css/tailwind.css", 'vuetify/lib/styles/main.sass' ],

But there is no luck and still the same error persists.