Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

367
Vistas
What is the problem, the code throws no error but it said SyntaxError: Cannot use import statement outside a module

This is the error I get :

SyntaxError: Cannot use import statement outside a module

  .on("queueEnd", (player) => {
    let QueueEmbed = new MessageEmbed()
      .setAuthor({
        name: "The queue has ended",
        iconURL: this.botconfig.IconURL,
      })
      .setColor(this.botconfig.EmbedColor)
      .setTimestamp();
      client.channels.cache
      .get(player.textChannel)
      .send({ embeds: [QueueEmbed] });
    })
      if (!this.botconfig["24/7"]) {
        setTimeout(() => {
    if (player.paused || player.playing ||  player.queue.length > 0) return;
          player.destroy();
        },2*60*1000//time in milliseconds ;-; 2 minutes
        )};
  }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Whenever you use the import (or export) keywords, you will need to make sure that the file containing these keywords is a module. A common way of making a mistake in this respect is to create a <script> tag in your HTML without a type="module" attribute.

Read more here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda