Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_REQUIRE_ESM when creating a new feathers project #3392

Closed
patamimbre opened this issue Jan 22, 2024 · 1 comment · Fixed by #3393
Closed

ERR_REQUIRE_ESM when creating a new feathers project #3392

patamimbre opened this issue Jan 22, 2024 · 1 comment · Fixed by #3393

Comments

@patamimbre
Copy link

Steps to reproduce

Run npm create feathers@latest feathers-chat as described in the docs

Expected behavior

It should create a base project

Actual behavior

It throws ERR_REQUIRE_ESM error

/Users/patamimbre/.npm/_npx/eb274edb682bcb28/node_modules/create-feathers/bin/create-feathers:7
const { Command, commandRunner, chalk } = require('@feathersjs/cli')
                                          ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/patamimbre/.npm/_npx/eb274edb682bcb28/node_modules/@feathersjs/cli/lib/index.js from /Users/patamimbre/.npm/_npx/eb274edb682bcb28/node_modules/create-feathers/bin/create-feathers not supported.
Instead change the require of index.js in /Users/patamimbre/.npm/_npx/eb274edb682bcb28/node_modules/create-feathers/bin/create-feathers to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/patamimbre/.npm/_npx/eb274edb682bcb28/node_modules/create-feathers/bin/create-feathers:7:43) {
  code: 'ERR_REQUIRE_ESM'
}

System configuration

Module versions (especially the part that's not working):
create-feathers@5.0.15

NodeJS version:
v21.5.0 (tried with node v20 too)

Operating System:
Macos Sonoma 14.2.1

@daffl
Copy link
Member

daffl commented Jan 22, 2024

Whoops, thank you. Should be fixed in 5.0.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants