Playwright tests fail with nitro preset azure
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 437
- Forks
- 120
- Avg merge
- 22h 52m
- Merged PRs (30d)
- 23
Description
Environment
- Operating System: Windows_NT
- Node Version: v18.17.1
- Nuxt Version: 3.12.4
- CLI Version: 3.12.0
- Nitro Version: -
- Package Manager: pnpm@9.6.0
- Builder: -
- User Config: future, compatibilityDate, devtools, nitro, extends, runtimeConfig, $test, modules, i18n, typescript, tailwindcss
- Runtime Modules: @vueuse/nuxt@10.11.0, @nuxtjs/i18n@8.3.1, @nuxt/test-utils/module@3.13.1
- Build Modules: -
Reproduction
Describe the bug
When using the built-in utils from @nuxt/test-utils/playwright using the azure preset for nitro, running pnpm exec playwright test fails with:
Error: Cannot find module '/.nuxt/test/xxxx/output/server/index.mjs'
I have tried to point it to the location set when using azure through the nuxt configs in playwright.config.ts but the same suffix including server/index.mjs keeps being appended so no entry point is found.
Additional context
Overwriting the preset through nuxtConfig to use node-server in playwright.config.ts or using the utils directly from @playwright/test and replacing nuxt configs with a webServer running against azure CLI built preview works, but neither one of these are ideal solutions.
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the built-in utilities from @nuxt/test-utils/playwright and the playwright.config.ts reproduction, focusing on how the Azure Nitro preset resolves its server entry point. Compare this with the node-server preset and confirm that pnpm exec playwright test can run against Azure without appending server/index.mjs to the configured path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, nuxt, playwright, typescript
- Domain
- cloud, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100