Error: [VuetifyLoaderPlugin Error] No matching rule for vue-loader found.
See original GitHub issueI’m running
`Environment Info:
System: OS: freebsd CPU: (4) x64 Intel® Xeon® CPU E3-1220 v3 @ 3.10GHz Binaries: Node: 15.2.0 - /usr/local/bin/node Yarn: Not Found npm: 6.14.8 - /usr/local/bin/npm npmPackages: @vue/babel-helper-vue-jsx-merge-props: 1.2.1 @vue/babel-helper-vue-transform-on: 1.0.0-rc.2 @vue/babel-plugin-jsx: 1.0.0-rc.3 @vue/babel-plugin-transform-vue-jsx: 1.2.1 @vue/babel-preset-app: 4.5.8 @vue/babel-preset-jsx: 1.2.4 @vue/babel-sugar-composition-api-inject-h: 1.2.1 @vue/babel-sugar-composition-api-render-instance: 1.2.4 @vue/babel-sugar-functional-vue: 1.2.2 @vue/babel-sugar-inject-h: 1.2.2 @vue/babel-sugar-v-model: 1.2.3 @vue/babel-sugar-v-on: 1.2.3 @vue/cli-overlay: 4.5.8 @vue/cli-plugin-babel: ~4.5.0 => 4.5.8 @vue/cli-plugin-eslint: ~4.5.0 => 4.5.8 @vue/cli-plugin-router: ~4.5.0 => 4.5.8 @vue/cli-plugin-typescript: ~4.5.0 => 4.5.8 @vue/cli-plugin-vuex: ~4.5.0 => 4.5.8 @vue/cli-service: ~4.5.0 => 4.5.8 @vue/cli-shared-utils: 4.5.8 @vue/component-compiler-utils: 3.2.0 @vue/eslint-config-typescript: ^5.0.2 => 5.1.0 @vue/preload-webpack-plugin: 1.1.2 @vue/web-component-wrapper: 1.2.0 eslint-plugin-vue: ^6.2.2 => 6.2.2 typescript: ~3.9.3 => 3.9.7 vue: ^2.6.11 => 2.6.12 vue-class-component: ^7.2.3 => 7.2.6 vue-cli-plugin-vuetify: ~2.0.7 => 2.0.7 vue-eslint-parser: 7.1.1 vue-hot-reload-api: 2.3.4 vue-loader: 15.9.5 (16.0.0-rc.1) vue-property-decorator: ^8.4.2 => 8.5.1 vue-router: ^3.2.0 => 3.4.9 vue-style-loader: 4.1.2 vue-template-compiler: ^2.6.11 => 2.6.12 vue-template-es2015-compiler: 1.9.1 vuetify: ^2.2.11 => 2.3.17 vuetify-loader: ^1.3.0 => 1.6.0 vuex: ^3.4.0 => 3.5.1 npmGlobalPackages: @vue/cli: 4.5.8 `
Just
vue create vuetify vue add vuetify npm run build
yields
`
ERROR Failed to compile with 2 errors 2:01:50 AM
error in /usr/home/tarkhil/work/vuetify/src/main.ts
ERROR in /usr/home/tarkhil/work/vuetify/src/main.ts(12,3): 12:3 No overload matches this call. Overload 1 of 3, ‘(options?: ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never> | undefined): CombinedVueInstance<Vue, object, object, object, Record<…>>’, gave the following error. Argument of type ‘{ router: VueRouter; store: Store<{}>; vuetify: any; render: (h: CreateElement) => VNode; }’ is not assignable to parameter of type ‘ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>’. Object literal may only specify known properties, and ‘vuetify’ does not exist in type ‘ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>’. Overload 2 of 3, ‘(options?: ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object> | undefined): CombinedVueInstance<Vue, object, object, object, Record<…>>’, gave the following error. Argument of type ‘{ router: VueRouter; store: Store<{}>; vuetify: any; render: (h: CreateElement) => VNode; }’ is not assignable to parameter of type ‘ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>’. Object literal may only specify known properties, and ‘vuetify’ does not exist in type ‘ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>’. Overload 3 of 3, ‘(options?: ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<…>> | undefined): CombinedVueInstance<…>’, gave the following error. Argument of type ‘{ router: VueRouter; store: Store<{}>; vuetify: any; render: (h: CreateElement) => VNode; }’ is not assignable to parameter of type ‘ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<…>>’. Object literal may only specify known properties, and ‘vuetify’ does not exist in type ‘ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<…>>’. 10 | router, 11 | store,
12 | vuetify, | ^ 13 | render: h => h(App) 14 | }).$mount(‘#app’) 15 |
error in /usr/home/tarkhil/work/vuetify/src/plugins/vuetify.ts
ERROR in /usr/home/tarkhil/work/vuetify/src/plugins/vuetify.ts(2,21):
2:21 Could not find a declaration file for module ‘vuetify/lib’. ‘/usr/home/tarkhil/work/vuetify/node_modules/vuetify/lib/index.js’ implicitly has an ‘any’ type.
Try npm install @types/vuetify
if it exists or add a new declaration (.d.ts) file containing declare module 'vuetify/lib';
1 | import Vue from ‘vue’;
2 | import Vuetify from ‘vuetify/lib’; | ^ 3 | 4 | Vue.use(Vuetify); 5 |
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vuetify@0.1.0 build: vue-cli-service build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vuetify@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I've changed vue.config.js to
const VuetifyLoaderPlugin = require(‘vuetify-loader/lib/plugin’)
module.exports = {
configureWebpack: {
plugins: [
new VuetifyLoaderPlugin()
],
},
“transpileDependencies”: [
“vuetify”
]
}
and got
ERROR Error: [VuetifyLoaderPlugin Error] No matching rule for vue-loader found.
Make sure there is at least one root-level rule that uses vue-loader.
Error: [VuetifyLoaderPlugin Error] No matching rule for vue-loader found.
Make sure there is at least one root-level rule that uses vue-loader.
at VuetifyLoaderPlugin.apply (/usr/home/tarkhil/work/vuetify/node_modules/vuetify-loader/lib/plugin.js:29:13)
at webpack (/usr/home/tarkhil/work/vuetify/node_modules/webpack/lib/webpack.js:51:13)
at /usr/home/tarkhil/work/vuetify/node_modules/@vue/cli-service/lib/commands/build/index.js:200:5
at new Promise (<anonymous>)
at build (/usr/home/tarkhil/work/vuetify/node_modules/@vue/cli-service/lib/commands/build/index.js:199:10)
at async /usr/home/tarkhil/work/vuetify/node_modules/@vue/cli-service/lib/commands/build/index.js:89:7
`
What should I do next?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
This issue is being closed due to inactivity.
If you have any additional questions, please reach out to us in our Discord community.
Using 1.6 gives me same error too