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

Not compatible with Vue v2.6.x #87

Open
1 task done
Asim-Tahir opened this issue Nov 12, 2024 · 0 comments
Open
1 task done

Not compatible with Vue v2.6.x #87

Asim-Tahir opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Asim-Tahir
Copy link

Asim-Tahir commented Nov 12, 2024

Describe the bug

In package.json#L30 the vue dependency seems to support v2.6.x but it does not. At runtime, it throws an error that the defineComponent function from the vue dependency cannot be found. Can we use the object definition export default instead of using defineComponent for components.

Example to reproduce

https://codesandbox.io/p/devbox/rete-js-v2-vue-js-v2-6-customization-cr7whg

How to reproduce

  • Open Codesandbox link
  • Codesandbox automatically open preview. If do not open preview for port 8080
  • Open preview in new tab(to see error clearly in console)
  • Open browser DevTools
  • Go to Console tab in DevTools
  • See Uncaught TypeError: Object(...) is not a function... error

Expected behavior

Do not throw any error if support vue v2.6.x.

Can we use the object definition export default instead of using defineComponent for components

<script>
- import { defineComponent } from 'vue'
-
- export default defineComponent({
+ export default {
  props: ['data', 'start', 'end', 'path']
- })
+ }
</script>

Dependencies

retejs-v2-vuejs-v2.6-customization@0.1.0 /project/workspace
├── @typescript-eslint/eslint-plugin@2.34.0
├── @typescript-eslint/parser@2.34.0
├── @vue/cli-plugin-babel@4.5.19
├── @vue/cli-plugin-eslint@4.5.19
├── @vue/cli-plugin-typescript@4.5.19
├── @vue/cli-service@4.5.19
├── @vue/eslint-config-prettier@6.0.0
├── @vue/eslint-config-typescript@5.1.0
├── core-js@3.39.0
├── eslint-plugin-prettier@3.4.1
├── eslint-plugin-vue@7.20.0
├── eslint@6.8.0
├── prettier@1.19.1
├── rete-area-plugin@2.1.1
├── rete-connection-plugin@2.0.5
├── rete-render-utils@2.0.3
├── rete-vue-plugin@2.1.1
├── rete@2.0.5
├── sass-loader@8.0.2
├── sass@1.32.13
├── tslib@2.3.1
├── typescript@4.7.4
├── vue-template-compiler@2.6.14
└── vue@2.6.14

Platform

Edge: 130.0.2849.80, Node.js: v16.20.2

Relevant log output

Uncaught TypeError: Object(...) is not a function
    at eval (rete-vue-plugin.esm.js:200:1)
    at ./node_modules/rete-vue-plugin/vue2/rete-vue-plugin.esm.js (chunk-vendors.js:2118:1)
    at __webpack_require__ (app.js:849:30)
    at fn (app.js:151:20)
    at eval (editor.ts:1:1)
    at ./src/editor.ts (app.js:1359:1)
    at __webpack_require__ (app.js:849:30)
    at fn (app.js:151:20)
    at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js:2:65)
    at ./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js (app.js:938:1)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Asim-Tahir Asim-Tahir added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant