-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Failed to compile gatsby-*.ts
to JS when absolute path contains a character like "()"
#36788
Comments
Workaroundadding empty That said I am not sure if the config will be applied as it's my first time using gatsby so I would do: changing from:
to:
in
to
|
gatsby-config.ts
to gatsby-config.js
Hi @Szulerinio, I was unable to reproduce this either on your minimal reproduction site or by following "Steps to Reproduce" (with node The first error you posted above suggests that you named the config as
You seem to have two different error messages. Would be better to provide the exact error your running into along with the site that produces the error as minimal repro |
I was tinkering with filenames etc when looking for workaround, and I tried changing names of this file, I must have copied messages from one of these logs instead of from original project. I am sorry for that. In few hours Ill be back home, and will go through steps again and post correct messages. I had the same repo cloned on my linux laptop, and there was no such issue, so it might be platform dependent, or a result of something else on my windows pc |
I've made new project, yet had the same issue. Then, I've decided reinstall gatsby-cli -g Thanks for your response and sorry for the trouble |
I got that error again, from my few tries it happens when path to the project contains "(" and ")" symbol I ran npm run develop inside After that, I ran gatsby clean again, changed back the directory name and got that error again Tried few more times, and I didn't encounter the error if I didn't run gatsby clean after changing directory name to not contain () |
Ah! Thanks for finding this @Szulerinio! I can reproduce this on my machine too. There's probably a group of characters asides "()" that will cause this to happen 🤔 But for now I'll update the title and description of this issue to indicate what we know. In #19600, we tried fix issues with special chars in path but this feature came after that — that's probably why we didn't capture this. Thanks again 💜 |
gatsby-config.ts
to gatsby-config.js
gatsby-*.ts
to JS when absolute path contains a character like "()"
Preliminary Checks
Description
Gatsby failed to compile
gatsby-*.ts
to JS when absolute path contains a character like "()"Reproduction Link
https://github.com/Szulerinio/build-test
Steps to Reproduce
In an existing project, rename the site directory to include "()" e.g
"my-site"-> "my-site(1)"Expected Result
Builded, working project with console logs similar to:
Actual Result
Failed build with logs like this:
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: