Mw3y / nuxt-monaco-editor-wrapper

Integrate monaco-editor-wrapper with Nuxt 3
2 stars 0 forks source link

The requested module does not provide an export named Xxx #2

Open Sun-ZhenXing opened 1 month ago

Sun-ZhenXing commented 1 month ago

By creating a brand new Nuxt project, I found that the example doesn't work:

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/vscode-languageclient@9.0.1/node_modules/vscode-languageclient/lib/common/client.js?v=d59c9ed0' does not provide an export named 'BaseLanguageClient' (at index.ts:6:10)

Run this:

pnpm dlx nuxi@latest init test-playground
cd test-playground
pnpm i
npx nuxi module add nuxt-monaco-editor-wrapper

I run this project with pnpm and have no problems.

Using the .npmrc file has no effect.

This should be caused by vite not optimizing the modules for CommonJS, however there are too many CJS modules in the project.

Mw3y commented 1 month ago

Hello,

I also encountered this issue during development. Sadly I haven't found a way to fix this issue. This module currently does not work at all. The only way to make it work is by directly adding it to your project.