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

Standalone esm option --code-esm is not recognized #2354

Open
nsheff opened this issue Dec 14, 2023 · 0 comments
Open

Standalone esm option --code-esm is not recognized #2354

nsheff opened this issue Dec 14, 2023 · 0 comments

Comments

@nsheff
Copy link

nsheff commented Dec 14, 2023

What version of Ajv are you using? Does the issue happen if you use the latest version?

ajv-cli@5.0.0

The docs say:

pass the --code-esm (CLI) flag if you want ESM exported code.

But when I do this:

ajv compile -s numeric.json --code-esm -o validate_schema.js

It gives this error:

error: parameter --code-esm is unknown

Indeed, in ajv help compile, there is no option listed for --code.esm. So, the documentation here is incorrect: https://ajv.js.org/standalone.html

Maybe related to #2209 -- is ESM module generation not working, and so the CLI option has been removed?

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

No branches or pull requests

2 participants
@nsheff and others