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

"The URL must be of scheme file" #1038

Open
TheDutchCoder opened this issue Dec 9, 2024 · 10 comments
Open

"The URL must be of scheme file" #1038

TheDutchCoder opened this issue Dec 9, 2024 · 10 comments

Comments

@TheDutchCoder
Copy link

TheDutchCoder commented Dec 9, 2024

Environment


  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.16.0
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: default
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-v73onkdp-5xtwbedy?file=vitest.config.ts,globalSetup.ts,test.vitest.e2e.spec.ts

Describe the bug

Whenever I try to use vitest for e2e testing, the setup function always errors out with a "The URL must be of scheme file" error.
The error doesn't tell me anything about what might be wrong, but the runner simply never starts and it has something to do with it expecting a build (even though it's configured to run against localhost instead).

Additional context

Even when I empty out the vitest config file it doesn't work. I wonder if there's an issue resolving some path internally?

@TheDutchCoder
Copy link
Author

Turns out the problem is setting environment: 'nuxt', in the vitest config.
When I remove that, it works fine.

I'm not sure why,.

@scottbedard
Copy link

I'm also running into this, downgrading to ^3.14.4 works

@paambaati
Copy link

paambaati commented Dec 11, 2024

Same, staying on 3.14.x until this is resolved.

@dd-avrillo
Copy link

Same here, downgrading to "@nuxt/test-utils": "3.14.4", fixed it for me too, thanks @scottbedard. Mac here.

@TheDutchCoder
Copy link
Author

Didn't work for me unfortunately 😢

@HP8585
Copy link

HP8585 commented Dec 11, 2024

I am also facing the same issue rn, nuxt 3.14 is fraught with bugs and errors, wearing us down

@cybercoder-naj
Copy link

I downgraded from @nuxt/test-utils from 3.15 to 3.14.4 and I am still facing this issue. :(

@fimion
Copy link

fimion commented Dec 13, 2024

downgraded to @nuxt/test-utils from 3.15 to 3.14.4 and that seems to work for us, but we are not using SSR with [email protected].

@FrankoFM
Copy link

Downgrading to 3.14.4 is working, everyone having problems with it make sure to not include the ^ in your package.json, also deleting .nuxt and node_modules can help.

@HP8585
Copy link

HP8585 commented Dec 23, 2024

even downgrading to 3.14 doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants