Open
Description
openapi-typescript version
7.8.0
Node.js version
18.20
OS + version
windows 11
Description
E:\git_code\trade\openapi-ts\node_modules.pnpm\openapi-typescript@7.8.0_typescript@5.5.4\node_modules\openapi-typescript\dist\lib\redoc.cjs:7\r
const parseJson = require('parse-json');\r
^\r
\r
Error [ERR_REQUIRE_ESM]: require() of ES Module E:\git_code\trade\openapi-ts\node_modules.pnpm\parse-json@8.3.0\node_modules\parse-json\index.js from E:\git_code\trade\openapi-ts\node_modules.pnpm\openapi-typescript@7.8.0_typescript@5.5.4\node_modules\openapi-typescript\dist\lib\redoc.cjs not supported.\r
Reproduction
when use "require": "./dist/index.cjs", will see Error [ERR_REQUIRE_ESM]
because parse-json not supporting cjs!
Expected result
no Error [ERR_REQUIRE_ESM]
Required
- My OpenAPI schema is valid and passes the Redocly validator (
npx @redocly/cli@latest lint
)
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)