Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

373
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!