react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

require() of ES Module error

Open karishag opened this issue 1 year ago • 2 comments
trafficstars

Description

On the server side, when using notion-client package I get the require() of ES Module not supported error. I modified tsconfig.json file compilerOptions to this:

"target": "ES2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. / "resolveJsonModule": true, / Resolve 'import x from y.json' to 'y.json'. */ "module": "CommonJS"

Also installed esm module, and set "type": "module" in package.json file but nothing helps.

Notion Test Page ID

067dd719-a912-471e-a9a3-ac10710e7fdf

Screenshot 2024-05-16 at 10 49 04 AM

karishag avatar May 16 '24 05:05 karishag