I can't used in nuxt3
See original GitHub issueWhen I comment out import VueKonva from 'vue-konva'
in /plugins/vuekonva.js it works
But I comment in , it doesn’t work
terminal log
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/rosie/Documents/rosie/nuxt3-app/node_modules/konva/lib/index-node.js from /Users/rosie/Documents/rosie/nuxt3-app/node_modules/vue-konva/umd/vue-konva.js not supported.
Instead change the require of index-node.js in /Users/rosie/Documents/rosie/nuxt3-app/node_modules/vue-konva/umd/vue-konva.js to a dynamic import() which is available in all CommonJS modules.
at webpackUniversalModuleDefinition (/Users/rosie/Documents/rosie/nuxt3-app/node_modules/vue-konva/umd/vue-konva.js:7:44)
at Object.<anonymous> (/Users/rosie/Documents/rosie/nuxt3-app/node_modules/vue-konva/umd/vue-konva.js:14:3)
at async Promise.all (index 0)
at async __instantiateModule__ (file:///Users/rosie/Documents/rosie/nuxt3-app/.nuxt/dist/server/server.mjs:2607:3) {
code: 'ERR_REQUIRE_ESM'
}
[vite dev] Error loading external "/Users/rosie/Documents/rosie/nuxt3-app/node_modules/vue-konva/umd/vue-konva.js".
at file://./.nuxt/dist/server/server.mjs:2248:291
at async __instantiateModule__ (file://./.nuxt/dist/server/server.mjs:2607:3)
I tried #9 and stack overflow but it also fail
package.json
"devDependencies": {
"nuxt3": "latest"
},
"dependencies": {
"konva": "^8.3.2",
"vue-konva": "^2.1.7"
}
nuxt.config.js
export default defineNuxtConfig({
// plugins: ["~/plugins/vue-konva"],
plugins: [
{ src: "~/plugins/vuekonva", mode: 'client' }
],
build: {
transpile: ['konva']
},
})
/plugins/vuekonva.js
import Vue from 'vue';
import VueKonva from 'vue-konva'
Vue.use(VueKonva)
can anyone help ? thank
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Why can't I access useAsyncData in a Nuxt 3 script setup tag ...
I'm using the Prismic API to get some data that I want to show in my Nuxt3 template.
Read more >Nuxt 3 issue "Cannot read property 'resolveAlias' of undefined"
ERROR Cannot restart nuxt: Cannot read property 'resolveAlias' of undefined at Object.
Read more >Nuxt 3 first steps. - ITNEXT
Now, during my research, I found a lot of tutorials on how to connect Nuxt 3 with new modules like i18n, Algolia, or...
Read more >How to use Vuetify with Nuxt 3 - Cody Bontecou
Utilize the latest versions of Vuetify and Nuxt together. Installation #. Start by creating a Nuxt 3 project if you do not have...
Read more >Nuxt 3 Tutorial Series | Part 6 | Data Fetching - YouTube
Hi all,In this video, we will see how we can have data fetching in Nuxt 3. We will see useFetch(), useAsyncData() and $fetchNuxt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
guys I can confirm vue-konva (2.1.7) works with nuxt2 and nuxt-composition api… So this is not on konva. Haven’t checked the new release yet
This might be related https://github.com/nuxt/framework/issues/4084