How to fix the "Parse failure: Unterminated string constant" error
New Courses Coming Soon
Join the waiting lists
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”
→ Get my JavaScript Beginner's Handbook
→ Read my
JavaScript Tutorials
on The Valley of Code
→ Read my
TypeScript Tutorial
on The Valley of Code
Here is how can I help you:
- COURSES where I teach everything I know
- CODING BOOTCAMP cohort course - next edition in 2025
- BOOKS 16 coding ebooks you can download for free on JS Python C PHP and lots more
- Follow me on X