The code contains just the following, I made this ...
# functions
i
The code contains just the following, I made this on purpose to validate the assumption, and it fails with the above exception.
Copy code
import { Client } from "@notionhq/client"

export async function onRequestPost(context) {
  const notion = new Client({ auth: context.env.NOTION_INTERNAL_INTEGRATION_TOKEN })
}
Prior to that I ditched the package and used plain JS + fetch to work with API, but I need packages for more complex tasks where I can't implement in plain JS due to time constraints.