Skip to content

Error Require() of ES Module not supported #277

@normdoow

Description

@normdoow

Description

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/noahbragg/Developer/node_projects/potion/potion-site-v2/node_modules/notion-utils/build/index.js from /Users/noahbragg/Developer/node_projects/potion/potion-site-v2/lib/config.ts not supported.
Instead change the require of index.js in /Users/noahbragg/Developer/node_projects/potion/potion-site-v2/lib/config.ts to a dynamic import() which is available in all CommonJS modules.

Im on the latest version of react-notion-x
"notion-client": "=6.12.0",
"notion-types": "=6.11.0",
"notion-utils": "=6.11.0",
"react-notion-x": "=6.12.5",

Using next v12.1.1

Notion Test Page ID

No page id. Just get this error when running any page that needs the notion-utils library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions