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

createElementVNode is not a function with @vue/cli #117

Closed
koooge opened this issue Nov 15, 2021 · 5 comments
Closed

createElementVNode is not a function with @vue/cli #117

koooge opened this issue Nov 15, 2021 · 5 comments

Comments

@koooge
Copy link

koooge commented Nov 15, 2021

Hi there,

I'm struggling to make a lib with @vue/cli and stuck because @vue/cli looks like a minor choice for vue-demi.

vue.config.js:

module.exports = {
  configureWebpack: {
    externals: {
      'vue-demi': 'vue-demi',
    },
  },
};

user outputs the error (vue 2.6.14):

TypeError: (0 , external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode) is not a function

It does not seem that there is such a method createElementVNode in Vue2. Is this an issue only with @vue/cli?

env: vue-demi 0.12.1, vue 3.2.22, @vue/cli 5.0.0-rc.0

@koooge
Copy link
Author

koooge commented Nov 16, 2021

I realized it might be related #22. Vue plugin library may be impossible made with vue-demi.

@koooge
Copy link
Author

koooge commented Nov 16, 2021

It is caused by vue 3.2 breaking change vuejs/core#3334 . Also, @vue/cli v5 does not support vue3.1 vuejs/vue-cli#6808 . well, deadlocked

@flozero
Copy link

flozero commented Feb 16, 2022

So what we are saying right now is that it's impossible to create a ui compnoents library that is compatible vue2 and vue3 ?.... That's a big problem here...

@lianulloa
Copy link

I had a similar problem but for me it fails to find defineComponent
It fails at this line

/* harmony default export */ var Iconvue_type_script_setup_true_lang_ts = (/*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({

My use case

I built a component library with vue-demi, based in Vue 3.2. I installed in another project with Vue3.2 and it worked.
When I try to install it in a Vue 2 project it says:
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"]) is not a function

@vue/cli 4.5.15

@sxzz
Copy link
Member

sxzz commented Sep 4, 2022

let's track #152

@sxzz sxzz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants