Issues with SCSS and Vuetify in Vue 3 using npm run serve — Invalid Dependencies

I encountered an issue when running my Vue 3 project, which uses Vuetify and SCSS. The project is started using the npm run serve command, and I am getting multiple warnings about “Invalid dependencies” for Vuetify SCSS files.

Environment:

Node.js: 18.18.0
Vue: 3.4.21
Vuetify: 3.7.2
Vue CLI: 5.0.8
sass: ^1.72.0
sass-loader: ^14.1.1

Error:

 warning  in ./node_modules/.cache/vuetify/lib/directives/ripple/VRipple.sass

Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.
Invalid dependencies may lead to broken watching and caching.
As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior.
Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).
Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).
Globs: They are not supported. Pass absolute path to the directory as context dependencies.
The following invalid values have been reported:
 * "D:/Constr/test/dio/frontend/node_modules/.cache/vuetify/lib/directives/ripple/VRipple.sass"

These messages concern different .sass files inside node_modules/.cache/vuetify. The error occurs with files related to Vuetify components, such as VTextField, VTextarea, VVirtualScroll, etc.

Here is my current vue.config.js, which works everywhere except on my PC:

const { VuetifyPlugin } = require('webpack-plugin-vuetify');

module.exports = {
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new VuetifyPlugin({
        autoImport: true,
        styles: { configFile: 'src/assets/styles/settings.scss' },
      }),
    ],
  },
  devServer: {
    port: 8080,
    proxy: process.env.VUE_APP_BASE_API,
  },
  productionSourceMap: false,
  transpileDependencies: ['vuetify'],
};

I tried:

  1. Clearing the Vuetify cache.
  2. Reinstalling dependencies.
  3. Testing different configurations in vue.config.js.
  4. Updating Vuetify to version 3.7.2.
  5. Removing the line styles: { configFile: ‘src/assets/styles/settings.scss’ }. The errors disappear, but part of the styles breaks.

For example, I changed the configuration based on suggestions from the web, like this one, but it didn’t help either:

const { VuetifyPlugin } = require('webpack-plugin-vuetify');
const path = require('path');

module.exports = {
  lintOnSave: false,
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src'),
      },
    },
    plugins: [
      new VuetifyPlugin({
        autoImport: true,
        styles: { configFile: path.resolve(__dirname, 'src/assets/styles/settings.scss') },
      }),
    ],
  },
  css: {
    loaderOptions: {
      sass: {
        additionalData: `@import "@/assets/styles/settings.scss";`,
        sassOptions: {
          includePaths: [path.resolve(__dirname, 'src/assets/styles')],
        },
      },
    },
  },
  chainWebpack: (config) => {
    config.module
      .rule('scss')
      .oneOf('normal')
      .use('sass-loader')
      .tap((options) => {
        options.sassOptions = {
          includePaths: [path.resolve(__dirname, 'src/assets/styles')],
        };
        return options;
      });
  },
  devServer: {
    port: 8080,
    proxy: process.env.VUE_APP_BASE_API,
  },
  productionSourceMap: false,
  transpileDependencies: ['vuetify'],
};

New contributor

Олег Гор_ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật