I want to use the notion client sdk inside a Figma plugin. It’s just used to call the Notion api, nothing particularly fancy about it. I get an error when I try to use it.
When I do this in some file:
import { Client, LogLevel } from "@notionhq/client";
export const notion = new Client({"<my credentials>"});
And then import the client in another file
import { notion } from "./someFile";
console.log(notion);
I get the following error:
Syntax error on line 372: Unexpected token ...
...authorizationHeader,
I probably have ran into this issue before in my life but don’t remember what it was. Probably some incompatibility issue. How do you generally debug these things? I have limited information on where to even look.
Thanks in advance if you have any ideas.