Cannot read Property ‘parseComponent’ of undefined
See original GitHub issueerror message
ERROR in ./src/vue/App.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):
Vue packages version mismatch:
- vue@3.0.0 (/Users/stephanie/Desktop/webpack/node_modules/vue/index.js)
- vue-template-compiler@2.6.12 (/Users/stephanie/Desktop/webpack/node_modules/vue-template-compiler/package.json)
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@ ./src/main.js 7:0-32 10:7-10
ERROR in ./src/vue/App.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
TypeError: Cannot read property 'parseComponent' of undefined
at parse (/Users/stephanie/Desktop/webpack/node_modules/@vue/component-compiler-utils/dist/parse.js:15:23)
at Object.module.exports (/Users/stephanie/Desktop/webpack/node_modules/vue-loader/lib/index.js:67:22)
@ ./src/main.js 7:0-32 10:7-10
webpack 5.1.0 compiled with 2 errors in 4436 ms
package.json
"vue-loader": "^15.9.3",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.1.0",
"vue"":"^3.0.0"
webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module:{
rules:
{
test: /\.vue$/,
loader: 'vue-loader'
},
},
plugins: [
new VueLoaderPlugin()
],
I have update the component ‘vue-template-Compiler’ to match the vue version.However, the version of the compiler was up to 2.6.12, while the vue version was 3.0.0, not resolve this problem
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Cannot read property 'parseComponent' of undefined · Issue ...
After doing npm update, my npm run dev is throwing a bunch of instances of one error: TypeError: Cannot read property 'parseComponent' of ......
Read more >laravel - Every vue component returning Cannot read property ...
Every vue component returning Cannot read property 'parseComponent' of undefined · Can you show the code with using 'parseComponent'? · Is this ...
Read more >Cannot read Property 'parseComponent' of undefined - vue-cli
In the Vue3 custom loader, error: Cannot read Property 'parseComponent' of undefined , the answer I found in the search engine was to ......
Read more >Every vue component returning Cannot read property ...
Coding example for the question Every vue component returning Cannot read property 'parseComponent' of undefined-Vue.js.
Read more >Cannot read property 'parseComponent' of undefined -
Cannot read property 'parseComponent' of undefined. svg-to-vue-component. 30 April 2021 Posted by Anaphase. Hi there. I'm trying to get svg-to-vue-component ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know this thread is closed but I wanted to share my solution for other people who stumble across this with google.
Using
"vue-loader": "^16.0.0-rc.1"
seems to make everything run fine. I am using encore-webpack but I believe the solution will work with just normal webpack.Hello, thank you for taking time filling this issue!
However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).
I hope to see your helper-created issue very soon!