New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue components fail with "Cannot read property 'parseComponent' of undefined" #1490
Comments
I have a same problem. |
@ vue/component-compiler-utils upgrade from v1.3 to v2.0, that is the reason . |
Same problem here on Win 10, Node v8.11.2, npm 5.6.0, parcel 1.8.1. |
Install latest 1.x.x version of compiler-utils and it should work as a workaround untill we figure out how to properly update with backward capability. Feel free to take on this issue as it’s just comparing changes between compiler-utils 1 & 2 and figuring out a way to support both Sent with GitHawk |
|
Seems like this bug #1490 appeared, after the change made in this commit vuejs/component-compiler-utils@caa1538#diff-3bebbbb54c7d798b4200eb324ebd4500R17 Tested for older version of vuejs/component-compiler-utils, works pretty fine.
Merged #1496 |
Seems like this bug #1490 appeared, after the change made in this commit vuejs/component-compiler-utils@caa1538#diff-3bebbbb54c7d798b4200eb324ebd4500R17 Tested for older version of vuejs/component-compiler-utils, works pretty fine.
Seems like this bug #1490 appeared, after the change made in this commit vuejs/component-compiler-utils@caa1538#diff-3bebbbb54c7d798b4200eb324ebd4500R17 Tested for older version of vuejs/component-compiler-utils, works pretty fine.
Seems like this bug parcel-bundler/parcel#1490 appeared, after the change made in this commit vuejs/component-compiler-utils@caa1538#diff-3bebbbb54c7d798b4200eb324ebd4500R17 Tested for older version of vuejs/component-compiler-utils, works pretty fine.
Have the same question, install @vue/component-compiler-utils not work for me, bellow is error message: assets by status 63.6 KiB [cached] 2 assets ERROR in ./src/vue/App.vue Vue packages version mismatch:
This may cause things to work incorrectly. Make sure to use the same version for both. ERROR in ./src/vue/App.vue webpack 5.1.0 compiled with 2 errors in 3988 ms other message: in package.json : "devDependencies": { what should i do next? |
🐛 bug report
Importing a Vue component fails with this error message:
App.vue: Cannot read property 'parseComponent' of undefined
The problem:
@vue/component-compiler-utils
expects acompiler
object in theoptions
passed toparse
. Parcel loads the template compiler, but does not pass it, inVueAsset.js
:parcel/src/assets/VueAsset.js
Line 20 in dc10531
The fix is to add
compiler: this.vueTemplateCompiler
to the options object in that call.🎛 Configuration (.babelrc, package.json, cli command)
Command:
yarn parcel watch --no-hmr --public-url . index.html
package.json
:No
.babelrc
.🤔 Expected Behavior
The Vue template should work seamlessly, like everything else in Parcel 😃
😯 Current Behavior
The following error happens:
💁 Possible Solution
See above:
VueAsset.js
should passcompiler
tothis.vue.parse
🔦 Context
💻 Code Sample
index.html
:main.js
:App.vue
:🌍 Your Environment
The text was updated successfully, but these errors were encountered: