nuxt: spaces/special characters in complete project path cause `ERR_INVALID_URL_SCHEME` vite error

Environment


  • Operating System: Windows_NT
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

image

Describe the bug

Error when I use run dev

Additional context

No response

Logs

500
[vite-node] [ERR_INVALID_URL_SCHEME] /node_modules/ufo/dist/index.mjs

at /node_modules/ufo/dist/index.mjs

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 19
  • Comments: 26 (10 by maintainers)

Most upvoted comments

This should be resolved in ufo v1.0.1. which you can get with npx nuxi upgrade.

Let me know if not and I’ll reopen.

As a note to future travellers to this page, I’ve found that using npx nuxi upgrade doesn’t work for me, however installing a fresh Nuxt 3 project works perfectly fine. Not ideal, but given how this issue was only around for a brief time I doubt it’s going to have much of an impact 😃

@danielroe thank you so much for fixing this so quickly, I really appreciate it 😊

This seems to be an issue when having “special characters” that have to be URL-encoded in the path. Could be umlauts like öäü, spaces and more.

@danielroe Could you add that to the issue?

Slightly related: nuxt/nuxt.js#15362

Same problem here :S

Please don’t post “+1” or “Same problem”. Instead, upvote issues or comments.

Also see https://github.com/nuxt/nuxt.js/issues/15492

El error es por que alguna ruta de tu directorio contiene un espacio, en mi caso lo tenia en una carpeta llamada “Documentos Julio” quitando el espacio compila de manera correcta

As mentioned already in the comment above ☺️

Yes, sorry, you are correct @manniL. Apologies. I have dig deeper and what I found is that I had space in my user space folder - “firstname lastname” and when I created new folder without space, it worked, so you are right.

It appears this also happens with stable if your folder path (windows) has any special characters (for me this was a space). My “Documents/Project Files” directory threw this error but my “Documents/testing” did not.