Vue-loader: vue-loader get can not resolved after install any loader, I have to reinstall vue-loader

Created on 30 Oct 2020  路  8Comments  路  Source: vuejs/vue-loader

Version

15.9.4

Reproduction link

http://nothing.com

Steps to reproduce

webpack@ 4.44.0
[email protected]

vue-loader @15.9.4
"vue-template-compiler": "^2.6.12",

What is expected?

run successfully

What is actually happening?

Vue packages version mismatch:

- [email protected] (/Users/wanghongye/Desktop/HomyeeKing/vue/vue3-ui-design/node_modules/vue/index.js)
- [email protected] (/Users/wanghongye/Desktop/HomyeeKing/vue/vue3-ui-design/node_modules/vue-template-compiler/package.json)
`Cannot read property 'parseComponent' of undefined`

need repro

Most helpful comment

Install vue-loader@next & @vue/compiler-sfc, and uninstall vue-template-compiler.

See https://github.com/vuejs/vue-next-webpack-preview for reference.

All 8 comments

Please provide a valid reproduction.

@sodatea

vue-loader : "^16.0.0-beta.8"

const { VueLoaderPlugin } = require('vue-loader-v16');
const { VueLoaderPlugin } = require('vue-loader');
const  VueLoaderPlugin  = require('vue-loader-v16');
const VueLoaderPlugin = require("vue-loader/lib/plugin");

I've tried every one ,but always happens error ....

which one is the exact way to import this loader 聽馃槴

image

Please please provide a reproduction repo.
I don't even understand what you are trying to achieve here. Are you trying to use vue 3 or vue 2?

Please please provide a reproduction repo.
I don't even understand what you are trying to achieve here. Are you trying to use vue 3 or vue 2?

it need webpack command, hard to repo,

in short:
I'm using vue3,
how to import vue-loader correctly and which is the proper version of vue-template-compiler

and everytime I install new loader, the vue-loader get can not be resolved...

Install vue-loader@next & @vue/compiler-sfc, and uninstall vue-template-compiler.

See https://github.com/vuejs/vue-next-webpack-preview for reference.

@vue/compiler-sfc

excellent! problem solved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheVexatious picture TheVexatious  路  3Comments

ryanelian picture ryanelian  路  3Comments

sdvcrx picture sdvcrx  路  3Comments

amorphine picture amorphine  路  3Comments

snoopdouglas picture snoopdouglas  路  3Comments