Init command not working
Fredx87 opened this issue · 2 comments
Fredx87 commented
Running npm init openapi-generator-plus
Returns an error:
const inquirer_1 = __importDefault(require("inquirer"));
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/xxx/.npm/_npx/5e4467a700b9eb92/node_modules/inquirer/lib/inquirer.js from /Users/xxx/.npm/_npx/5e4467a700b9eb92/node_modules/create-openapi-generator-plus/dist/create-api-project.js not supported.
Instead change the require of inquirer.js in /Users/xxx/.npm/_npx/5e4467a700b9eb92/node_modules/create-openapi-generator-plus/dist/create-api-project.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/xxx/.npm/_npx/5e4467a700b9eb92/node_modules/create-openapi-generator-plus/dist/create-api-project.js:34:36) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v20.11.0