Skip to content
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 component template throws: "_vue.createStaticVNode is not a function" #6545

Closed
satanch opened this issue Jul 5, 2021 · 3 comments
Closed

Comments

@satanch
Copy link

satanch commented Jul 5, 2021

🐛 bug report

When I'm trying to use .vue component in my Vue instance I'm getting error in page console:

Uncaught TypeError: _vue.createStaticVNode is not a function
    at Object.6udvv.vue (index.5a54036b.js:12461)
    at newRequire (index.5a54036b.js:71)
    at localRequire (index.5a54036b.js:83)
    at initialize (search.vue:6)
    at Object.6IuFu.template:./search.vue (search.vue:12)
    at newRequire (index.5a54036b.js:71)
    at localRequire (index.5a54036b.js:83)
    at Object.5U1BT.vue (runtime-e65980a9ccead31d9a86f233977061cd.js:366)
    at newRequire (index.5a54036b.js:71)
    at index.5a54036b.js:120

🎛 Configuration

package.json (deps part)

{
  "devDependencies": {
    "@parcel/transformer-sass": "^2.0.0-beta.3.1",
    "@parcel/transformer-vue": "^2.0.0-beta.3.1",
    "@vue/compiler-sfc": "^3.1.4",
    "@vue/component-compiler-utils": "^3.2.2",
    "axios": "^0.21.1",
    "normalize.css": "^8.0.1",
    "vue": "^2.6.14",
    "vue-i18n": "^8.24.5",
    "vue-router": "^3.5.2",
    "vuex": "^3.6.2"
  }
}

And simple CLI cmd: parcel serve ./web/landing/index.html --dist-dir landingDevBuild

💻 Code Sample

search.vue

<template>
    <div class="search-widget">
    </div>
</template>

<script>
    export default {
        data: function() {
            return {
                test: 1
            }
        }
    }
</script>

app.js

import search from './components/search.vue';

new Vue({
    components: {
        search
    }
}).$mount('#app');

index.html (part)

<div id="app"><search></search></div>

🌍 Environment

Software Version(s)
Parcel 2.0.0-beta.3.1
Node v14.16.1
npm/Yarn 6.14.12
@mischnic
Copy link
Member

mischnic commented Jul 5, 2021

This is probably because Parcel 2 only supports Vue 3: #6153 ?

@satanch
Copy link
Author

satanch commented Jul 5, 2021

Updated Vue to "vue": "^3.1.4" now I'm getting undefined on import:

import Vue from 'vue' // Vue is undefined

@satanch
Copy link
Author

satanch commented Jul 5, 2021

I guess Vue API has changed, I will reopen this if the same thing happens again with Vue v3.
Thanks!

@satanch satanch closed this as completed Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants