question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ajv bundle in CDNjs is broken, add draft 2020 to CDN

See original GitHub issue

I would like to use Ajv in a web page. For that purpose, I need to lead AJV as a standalone JavaScript file.

I have tried to follow the instructions here and to load a script from the CDN: https://cdnjs.com/libraries/ajv/8.6.1 but it didn’t work.

What script exactly should I load from the CDN? ajv.2019.min.js or ajv.2019.bundle.js?

I am sorry if I missed something…

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:28 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
realitykingcommented, Nov 10, 2021

I don’t use ajv in the browser but I’d be happy to take a look after Nov 20th (I’m on my honeymoon right now)

0reactions
epoberezkincommented, Nov 11, 2021

You either need to bundle ajv-formats with your code, which I think is better (with whatever bundling mechanism you use for your code - webpack, rollup, browserify - I can’t advise on what’s better for you), as it’s quite small, or create a separate browser bundle (again, with either of those tools). I’m not planning to create/maintain the browser bundle for ajv-formats.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ajv - Libraries - cdnjs - The #1 free and open source CDN built ...
ajv - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers.
Read more >
Ajv JSON schema validator - npm
The fastest JSON validator for Node.js and browser. Supports JSON Schema draft-04/06/07/2019-09/2020-12 (draft-04 support requires ajv ...
Read more >
Changes from Ajv v6.12.6 to v8.0.0 - Ajv JSON schema validator
JSON Schema draft-2020-12: prefixItems keyword and changed semantics of items ... browser bundles are automatically published to ajv-dist package (but still ...
Read more >
ajv - bytemeta
ajv repo issues. ... Add bundle for JSON Schema draft-2020-12 to CDN ... Ajv bundle in CDNjs is broken, add draft 2020 to...
Read more >
ajv-draft-04 | Yarn - Package Manager
Ajv class for JSON Schema draft-04 ... You need to install both ajv and this package (to allow upgrading ajv without upgrading ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found