Copyright 2025

The Valley of Code

A Flavio Copes project

How to fix the "Parse failure: Unterminated string constant" error
How to fix the "Parse failure: Unterminated string constant" error

I ran into this error with a student of mine, running Astro on Windows (could not replicate on macOS), after running npm run dev.

After much 🤔 we solved by renaming the parent folder, which apparently had a strange character, perhaps non-ASCII.

If you run into this problem, try renaming the folder you are running (or perhaps a parent folder in the path) to just ASCII text, like “test”


Want to master TypeScript? Check out my TypeScript Masterclass

Join my AI Workshop !

The Web Development BOOTCAMP cohort starts in February 2026