I am tring to use AJV JSON schema validator in my chrome app.
But I am getting the error
var validate = ajv.compile(schema);
If some library that you want to use is incompatible with Chrome CSP, then you can use it inside a sandbox.
The downside is that you can't write code that uses both Chrome API and the library. You need to separate this and communicate between two scripts.