Fails when editor is installed in directory containing spaces on windows
My vscode is installed in C:\Users\Isabella Skořepová\AppData\Local\Programs\Microsoft VS Code\Code.exe, which is the default installation location. The first space is mostly my fault created when I was installing the system, but the other two are added by vscode installer.
It fails with error
'C:\Users\Isabella' is not recognized as an internal or external command, operable program or batch file.
Sidenote: I am using vite, but I see the same issue when trying to import the middleware directly in a vite.config.ts file.
Get the same error.
I had a similar issue today in a Svelte app. removing the space in one of my project folder names fixed the issue but it was pretty hard bug to find
same error my vscode path is
C:\Users\xiaguangwei\AppData\Local\Programs\Microsoft VS Code\
but I got this error
'C:\Users\xiaguangwei\AppData\Local\Programs\Microsoft' is not recognized as an internal or external command,
operable program or batch file.
Could not open HelloWorld.vue in the editor.
The editor process exited with an error: (code 1).
see https://github.com/sveltejs/vite-plugin-svelte/issues/608#issuecomment-1480851467 for a .bat script that can be used with the LAUNCH_EDITOR env to work around this.