react-notion-x
react-notion-x copied to clipboard
require() of ES Module error
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