Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

222
Visualizações
MIME type ('text/html') error in HTML and JS

So i am working with html, scss and javascript. But when i try to turn a file into a module and try to import another file, It throws an error Loading module from “http://localhost:3000” was blocked because of a disallowed MIME type (“text/html”).

Here is my html (imports):

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" href="./images/core/Favicon.png">
        <link rel="stylesheet" href="./CSS/main.css">
        <link href='https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css' rel='stylesheet'>
        <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> 
        <link href="https://www.cssscript.com/wp-includes/css/sticky.css" rel="stylesheet" type="text/css">

        <!-- The script imports -->
        <script src="./Scripts/animations.js" defer></script>

        <!-- The file where i try to import a function from another file -->
        <script src="./Scripts/delivery.js" type="module" defer></script>
        <title>Home</title>
    </head>

Here is the file where I try to import a function (delivery.js):

import { confetti } from './confetti';

confetti();

// ...

Yes, i am exporting a function from confetti.js:

export function confetti() {
    // ...
}

Here is my file and folder structure for reference:

folders

Can anyone help.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda