-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Can't build astro if project path contains spaces on MacOS #12556
Comments
OK, I can reproduce this, and it's specifically an error in the MDX plugin. Thanks for the report! |
Seems this was introduced in |
Because of links etc, this can be reproduced in the Astro monorepo only if the monorepo itself has a space in the filename, or the package path. |
Looks like this is a Vite bug: vitejs/vite#9917 |
Any workaround for this? Because it works fine with Astro v4 without any problem. Astro v4 + @astrojs/mdx v3 works as expected. So looks like a regression? |
@surjithctly it will be fixed with the next patch of vite. As a workaround, avoid folders and files that contain spaces. |
Request to keep this issue open since the issue still exists in this version even if's its an upstream issue. So tracking this will be easier. |
@surjithctly Can you provide a repro? What's described in this issue is already fixed in the Vite patch. Is there anything else we're missing that's Astro-specific? |
The issue created before the new vite version is released. I did tried to upgrade now and it worked as expected. So, all good now to close this issue. |
Thanks for the update! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This might be an NPM or a Vite problem but I just started using Astro and it refuses to build if the project path contains a space on MacOS: for example, ".../new website" does not build, while ".../website" does.
The error is as follows:
astro vscode [ERROR] [vite] cannot find entry point module '.../Documents/new%20website/Site/node_modules/@astrojs/mdx/dist/server.js'.
It goes away if I change the path to the project to this: ".../Documents/Website/Site/node_modules/@astrojs/mdx/dist/server.js"
It was easy to fix for me, but I imagine if for example someone's username contains a space then they are in deep trouble.
What's the expected result?
Astro building my site.
Link to Minimal Reproducible Example
should be trivial to reproduce - in my case I just used the blog template and created a scratch project under a path with a space in the pathname.
Participation
The text was updated successfully, but these errors were encountered: