Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctx.nuxt does not exist when build: false in setup #936

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Al-Rozhkov
Copy link

πŸ”— Linked issue

Resolves #918

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Sep 9, 2024
@Boluwatife2904
Copy link

Boluwatife2904 commented Sep 9, 2024

Thank You so much for this @Al-Rozhkov. I've been wondering why I've unable to run my tests for a while without any luck.

@danielroe any chance this gets reviewed soon? Many thanks πŸ™πŸ½

@@ -54,7 +54,7 @@ export async function startServer(options: StartServerOptions = {}) {
}
else {
ctx.serverProcess = execa('node', [
resolve(ctx.nuxt!.options.nitro.output!.dir!, 'server/index.mjs'),
resolve(ctx.options.nuxtConfig.nitro.output!.dir!, 'server/index.mjs'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prioritize ctx.nuxt if it exists

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thank you for quick reply.

@danielroe
Copy link
Member

Would you be able to add a test in examples/app-vitest/test/build-false.e2e.spec.ts? πŸ™

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Sep 10, 2024
@danielroe
Copy link
Member

Thank you πŸ™

Can you explain a bit about why you would do this rather than passing that config to setup?

@Al-Rozhkov
Copy link
Author

Thank you πŸ™

Can you explain a bit about why you would do this rather than passing that config to setup?

I wasn't sure how to build Nuxt manually and make setup use exact that build. I would appreciate your advice.

Also not sure why windows tests failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ctx.nuxt does not exist when build: false in setup
3 participants