e-chan1007 / nuxt-monaco-editor

Integrate monaco-editor with Nuxt
https://e-chan1007.github.io/nuxt-monaco-editor
MIT License
119 stars 15 forks source link

__vite_ssr_import_2__.createMemoryHistory is not a function #18

Closed FStack-Consulting closed 1 year ago

FStack-Consulting commented 1 year ago

Hey there, whenever I start nuxt after installing this module along with monaco-editor I get the following error 500 for every page (even without using any of the Monaco components):

[nuxt] [request error] [unhandled] [500] __vite_ssr_import_2__.createMemoryHistory is not a function                                                                                                                                                            17:14:31
  at /E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:3321:256
  at fn (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:1126:27)
  at Object.callAsync (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/node_modules/unctx/dist/index.mjs:49:19)
  at callWithNuxt (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:1128:23)
  at applyPlugin (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:1072:29)
  at Module.applyPlugins (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:1082:11)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async createNuxtAppServer (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dist/server/server.mjs:45:7)
  at async Object.renderToString (/E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/node_modules/vue-bundle-renderer/dist/runtime.mjs:172:19)
  at async /E:/dokumente-volume-e/fullstack-consulting/_projekte/max-trash/_projekte2/flyte-main-projekt/.workdir/flyte-main/.nuxt/dev/index.mjs:932:21

The function called here is supposedly from vue-router which I obviously do not have installed since I use the NuxtPage-Component.

Can anyone help me on this one?

e-chan1007 commented 1 year ago

When using pages, vue-router is automatically included by nuxt. However, I couldn't reproduce this and figure out why this module is causing it.

Could you give me more details about the code?