4. Run the test with `npx vitest run`
-> It should works.
Now, install `nuxt-monaco-editor` dependency and add it to `modules` in `nuxt.config.ts` file.
Re-run the test.
-> Vitest error !
Output :
```bash
FAIL test/basic.test.ts [ test/basic.test.ts ]
Error: Failed to resolve entry for package "monaco-editor". The package may have incorrect main/module/exports specified in its package.json.
❯ packageEntryFailure node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46541:15
❯ resolvePackageEntry node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46538:3
❯ tryNodeResolve node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46354:16
❯ ResolveIdContext.resolveId node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46104:19
❯ PluginContainer.resolveId node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:48919:17
❯ TransformPluginContext.resolve node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49079:15
❯ normalizeUrl node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:63929:26
❯ node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:64068:39
❯ TransformPluginContext.transform node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:63995:7
❯ PluginContainer.transform node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49000:18
❯ loadAndTransform node_modules/.pnpm/vite@5.4.2_@types+node@22.5.0_terser@5.31.6/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:51822:27
Hi! And thanks a lot for your module.
I noticed that activate this module in a new fresh nuxt app will break test in nuxt environnement. The step to reproduce :
pnpm dlx nuxi@latest init $NAME
pnpm add -D @nuxt/test-utils vitest @vue/test-utils happy-dom
// Don't need playwrightvitest.config.ts
file with :./test/basic.test.ts
with :import { expect, it } from 'vitest' import { mountSuspended } from '@nuxt/test-utils/runtime'
import app from '~/app.vue'
it('should render app', async () => { const component = await mountSuspended(app) expect(component.html()).toContain('Welcome to Nuxt!') })