Anand Sukumaran Nair

Startup Founder, Software Engineer, Abstract thinker
Co-founder & CTO @ Engagespot (Techstars NYC '24)

Fix - No grammar provided for text.html.markdown.jsx in Netlify astro build

May 14, 2023

Recently, I got this error while trying to deploy an astro website to Netlify.

The error happens during astro build, and at the generating static routes step.

3:28:03 PM:  generating static routes 
3:28:03 PM: ▶ src/pages/index.astro
3:28:04 PM:  error   No grammar provided for <text.html.markdown.jsx>
3:28:04 PM:   File:
3:28:04 PM:     /opt/build/repo/node_modules/.pnpm/vscode-textmate@6.0.0/node_modules/vscode-textmate/release/main.js:1:3170

astro error message in netlify

Spent a lot of time trying to fix it. Finally, came to know that it happened due to NODE Version!

Solution

The solution was to specify the environment variable NODE_VERSION with value 20.1.0 in Netlify environment variable settings!

And that solved the issue!