vue-drag-resize icon indicating copy to clipboard operation
vue-drag-resize copied to clipboard

vue3 setup error render?

Open Okssq opened this issue 4 years ago • 12 comments

when i init component write setup function cause error?

image

Okssq avatar Sep 10 '21 10:09 Okssq

It looks not compatible with VUE 3

[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance.

Found same issues and workaorunds from other projects: https://github.com/nhn/tui.editor/issues/1226#issuecomment-709318502

gbrian avatar Sep 24 '21 06:09 gbrian

facing the same error when using the basic component in Vue 3.2 image

Sanan4li avatar Oct 05 '21 09:10 Sanan4li

facing the same error when using the basic component in Vue 3.2 image

Hey,

I have the same problem / error-message like @Sanan4li

R0ad-Runn3r avatar Oct 14 '21 18:10 R0ad-Runn3r

Same here, any update on this?

tomeraz avatar Nov 15 '21 12:11 tomeraz

same question

SHIXUNXUN avatar Nov 24 '21 05:11 SHIXUNXUN

image use vue3 ,The same problem

qujinxing-s avatar Dec 08 '21 02:12 qujinxing-s

Please use "npm i -s vue-drag-resize@next" for use in Vue3. https://github.com/kirillmurashov/vue-drag-resize/issues/102#issuecomment-814995060

Fine0830 avatar Dec 22 '21 06:12 Fine0830

谢谢,收到了。

qujinxing-s avatar Dec 22 '21 06:12 qujinxing-s

I'm getting an error in Vue 3 still. Using "vue-drag-resize": "^2.0.3"

I'm also using Nuxt 3, maybe that's part of the problem?

Error states:

ReferenceError: self is not defined
    at Object.<anonymous> (/Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-drag-resize/dist/index.js:1:241)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:169:25)
    at async Loader.import (internal/modules/esm/loader.js:177:24)
    at async __instantiateModule__ (file:///Users/calebwaldner/Code/galaxy-forms-web/.nuxt/dist/server/server.mjs:21337:3)
[Vue Router warn]: uncaught error during route navigation:
Error: [vite dev] Error loading external "/Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-drag-resize/dist/index.js".
    at file:///Users/calebwaldner/Code/galaxy-forms-web/.nuxt/dist/server/server.mjs:20665:297
    at async __instantiateModule__ (file:///Users/calebwaldner/Code/galaxy-forms-web/.nuxt/dist/server/server.mjs:21337:3)
[vite dev] Error loading external "/Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-drag-resize/dist/index.js".
  at file://./.nuxt/dist/server/server.mjs:20665:297
  at async __instantiateModule__ (file://./.nuxt/dist/server/server.mjs:21337:3)
(node:47332) UnhandledPromiseRejectionWarning: Error: [vite dev] Error loading external "/Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-drag-resize/dist/index.js".
    at file:///Users/calebwaldner/Code/galaxy-forms-web/.nuxt/dist/server/server.mjs:20665:297
    at async __instantiateModule__ (file:///Users/calebwaldner/Code/galaxy-forms-web/.nuxt/dist/server/server.mjs:21337:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:47332) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:47332) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Vue Router warn]: uncaught error during route navigation:
TypeError: Cannot read property '__vccOpts' of undefined
    at /Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-router/dist/vue-router.cjs.js:2022:55
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
Cannot read property '__vccOpts' of undefined
  at ./node_modules/vue-router/dist/vue-router.cjs.js:2022:55
  at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:47332) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '__vccOpts' of undefined
    at /Users/calebwaldner/Code/galaxy-forms-web/node_modules/vue-router/dist/vue-router.cjs.js:2022:55
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:47332) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)

Thanks for any help resolving this.

calebwaldner avatar Jan 20 '22 23:01 calebwaldner

谢谢,收到了。

qujinxing-s avatar Jan 20 '22 23:01 qujinxing-s

VUE 3:

npm i -s vue-drag-resize@next

Introduce dependent components directly into the parent component.

// demo.vue
<script setup lang="ts">
    import VueDragResize from 'vue-drag-resize/src/component/vue-drag-resize.vue';
</script >

<template>
    <VueDragResize :w="200"  :h="120" >
        Hello World
    </VueDragResize>
</template>

lnixz avatar May 05 '22 07:05 lnixz

谢谢,收到了。

qujinxing-s avatar May 05 '22 07:05 qujinxing-s

Screenshot from 2023-01-18 17-48-05 getting this error when i am trying to import this in my nuxt3 project

r0hit5292 avatar Jan 18 '23 12:01 r0hit5292

谢谢,收到了。

qujinxing-s avatar Jan 18 '23 12:01 qujinxing-s

Please use "npm i -s vue-drag-resize@next" for use in Vue3. #102 (comment)

still not working

r0hit5292 avatar Jan 18 '23 12:01 r0hit5292

谢谢,收到了。

qujinxing-s avatar Jun 28 '23 03:06 qujinxing-s