Search code examples
htmlreactjsreact-nativevue.jsmern

vite Internal server error: Unable to parse HTML; parse5 error code missing-whitespace-between-attributes


I created a vite using tailwindcss project and ran

npm run dev

This is the error message from my terminal

enter image description here

this is the index.html

<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet"href="https://rsms.me/inter/inter.css">
    <title>aadda</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.jsx"></script>
  </body>
</html>

Solution

  • The error message points out that your code is missing a whitespace between attributes. I can see that your second <link> tag inside the <head> is really missing a whitespace between the rel and href attributes. Try adding the whitespace: <link rel="stylesheet" href=" https://rsms.me/inter/inter.css">