Skip to content

Starter build fails on Node.js 18.19.1 - ERR_REQUIRE_ESM #102

Description

@fission-adi

https://community.n8n.io/t/help-potential-bug-in-n8n-node-starter/214314

I'm building a custom node. I tested the bare starter template first. The build fails. None of the following commands work after npm install:

npm run build
npm run dev

The n8n node cli tool fails as well:

npm create @n8n/node@latest

Error output:

Error: require() of ES Module /home/adibudithi/projects/n8n-nodes-starter/node_modules/@n8n/node-cli/node_modules/change-case/dist/index.js from /home/adibudithi/projects/n8n-nodes-starter/node_modules/@n8n/node-cli/dist/utils/filesystem.js not supported.
Instead change the require of index.js in /home/adibudithi/projects/n8n-nodes-starter/node_modules/@n8n/node-cli/dist/utils/filesystem.js to a dynamic import() which is available in all CommonJS modules.
Code: ERR_REQUIRE_ESM

Seems like an ESM vs CommonJS mismatch in a dependency, particularly change-case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions