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

spaces/special characters in complete project path cause ERR_INVALID_URL_SCHEME vite error #15492

Closed
erisvn opened this issue Nov 16, 2022 · 26 comments

Comments

@erisvn
Copy link

erisvn commented Nov 16, 2022

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
@erisvn erisvn changed the title Vite error when I use run dev on Nuxt3 Vite error when I run dev on Nuxt3 Nov 16, 2022
@therealokoro

This comment was marked as duplicate.

@sdezza

This comment was marked as duplicate.

@danielroe danielroe added the windows label Nov 16, 2022 — with Volta.net
@niuwenzheng

This comment was marked as duplicate.

@adamiss5138

This comment was marked as duplicate.

@manniL
Copy link
Member

manniL commented Nov 18, 2022

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: #15362

@CallumME
Copy link

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.

@alessioraggioli
Copy link

Same issue. I'm using node version 16.18.0
This is my package.json

{ "private": true, "scripts": { "build": "nuxt build", "dev": "nuxt dev --port 3500", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare" }, "devDependencies": { "@nuxtjs/apollo": "^5.0.0-alpha.4", "@nuxtjs/google-fonts": "^3.0.0-0", "@nuxtjs/moment": "^1.6.1", "nuxt": "3.0.0", "sass": "^1.55.0", "sass-loader": "^10", "vite-plugin-fonts": "^0.6.0" }, "dependencies": { "@mdi/font": "^7.0.96", "@pinia/nuxt": "^0.4.3", "fs.promises": "^0.1.2", "pinia-plugin-persistedstate": "^2.3.0", "vuetify": "^3.0.0" } }

@aritlh
Copy link

aritlh commented Nov 19, 2022

image

same problem lol

@belwalpb
Copy link

Same Problome. Even with rc14 as well as stable release.
image

@frasza

This comment was marked as duplicate.

@manniL

This comment was marked as off-topic.

@frasza

This comment was marked as off-topic.

@realdinho

This comment was marked as duplicate.

@Fanreza
Copy link
Contributor

Fanreza commented Nov 22, 2022

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.

My nuxt folder does not contain any special character, but the parent folder does and it make nuxt error
some folder -> myprojectfolder -> nuxt-app

Windows 10
Node v18.12.1
Npm 8.19.2

@Phatza

This comment was marked as duplicate.

@manniL

This comment was marked as duplicate.

@Julio-Campos-Swork
Copy link

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

@J3r0github

This comment was marked as duplicate.

@danielroe danielroe changed the title Vite error when I run dev on Nuxt3 spaces in complete project path cause ERR_INVALID_URL_SCHEME vite error Nov 25, 2022
@danielroe danielroe changed the title spaces in complete project path cause ERR_INVALID_URL_SCHEME vite error spaces/special characters in complete project path cause ERR_INVALID_URL_SCHEME vite error Nov 25, 2022
@jdgamble555
Copy link

Has the fix not been found yet? This seems like there should be a simple fix for this problem to still be there.

J

@manniL
Copy link
Member

manniL commented Nov 26, 2022

Has the fix not been found yet? This seems like there should be a simple fix for this problem to still be there.

Anyone, including you, can feel free to investigate and send in a PR 😋

@jdgamble555
Copy link

That's fair, however, you guys could find this simple fix in a quarter of the time as one of its new users. I'm pretty sure it was from something a few PRs ago. You guys made this stable knowing this problem exists, but I would bet this effects more than half of your users who are not going to decide to adopt it on their first use.

How often do people store their programming files in a folder with spaces or foreign characters?

Honestly, no idea.

I am not currently using Nuxt, or I would be happy to help out. For me, this was my first go at it.

All that being said, this does look incredibly amazing, I thank you guys for the hard work, and I look forward to trying this out a few versions from now.

J

@yungsinatra0
Copy link

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: #15362

Thank you for the workaround, worked like a charm! I was going crazy for the past day or so trying to figure out what was causing this issue.

@GlennHS
Copy link

GlennHS commented Nov 28, 2022

Just to add another example to the pile:

OS: Windows 10 Home v21H2
Nuxt Version: Latest
Error: 500 [vite-node] [ERR_INVALID_URL_SCHEME] /node_modules/ufo/dist/index.mjs
Directory: C:\Users\Glenn Hamilton-Smith\Documents\Code\NuxtLayoutTest

Windows users can't easily change their user's root folder name without editing the registry and risking damaging the integrity of existing software on their machine (as most installed software not installed for all users uses your Windows user folder name at time of installation).

I'm nowhere near skilled enough to raise a PR or work on this issue but if I can assist at all with more info, error logs, screenshots etc please let me know! Weirdly Nuxt was working perfectly for me up until about a week or two ago so I'm not sure what's changed 🤔

@therealokoro

This comment was marked as off-topic.

@danielroe
Copy link
Member

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.

@GlennHS
Copy link

GlennHS commented Nov 29, 2022

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 😊

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