Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026
The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.
This error can appear when running build tools like Astro, Webpack, or other bundlers:
Parse failure: Unterminated string constant
The cause
This error is often caused by special characters in your file path or folder names, particularly non-ASCII characters.
This issue has been observed primarily on Windows systems.
The fix
Rename the folder you’re running the project in (or a parent folder in the path) to use only ASCII characters.
For example, change:
Mon Projet→MonProjetormy-projectCódigo→CodigoorcodeDéveloppement→Developmentordev
Other potential causes
If renaming doesn’t help, the error might also be caused by:
-
Actual unterminated strings in your code: Check for missing closing quotes
// Bad const str = "Hello world // Good const str = "Hello world" -
Multi-line strings without proper syntax:
// Bad const str = "Line 1 Line 2" // Good - use template literals const str = `Line 1 Line 2` -
Encoding issues: Make sure your files are saved with UTF-8 encoding
-
Copy-pasted “smart quotes”: Word processors sometimes convert straight quotes to curly quotes
// Bad (smart quotes) const str = "Hello" // Good (straight quotes) const str = "Hello"