1

So I'm scraping this site's json content with javascript and sending a discord webhook through a chrome extension

import { MessageEmbed, WebhookClient } from "discord.js";

But chrome console gives me this error: Uncaught SyntaxError: Cannot use import statement outside a module,

If I remove the webhook and just log the scraped items in console it works. There's just something wrong with the importing...

I use VSC and Node.js

site: https://jsonplaceholder-typicode-com.translate.goog/posts?_x_tr_sl=en&_x_tr_tl=nl&_x_tr_hl=nl&_x_tr_pto=sc

Stewie
  • 33
  • 5

0 Answers0