Doesn't glitch support es6 module?

Hello!
I tried to host a discord bot written in node js es6 module, but it keeps throwing error that “unexpected token {” although it works fine locally.

import { Client, GatewayIntentBits, Collection } from "discord.js";
import { config } from "dotenv";
config();
import fs from "fs";
import { ListObjectsCommand } from "@aws-sdk/client-s3";
import s3 from "./client/aws.js";
import http from "http";

That seems strange to me, I don’t get any error. Can you please give your project’s name, or if it’s private, then your index.js code?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.