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

Error running example #10

Open
alaninmcr opened this issue Nov 18, 2020 · 2 comments
Open

Error running example #10

alaninmcr opened this issue Nov 18, 2020 · 2 comments
Assignees

Comments

@alaninmcr
Copy link

I installed the npm as indicated. Ignoring the errors, I then tried:

node example.js

where example.js contained the code in the installation instructions

This gave the error:

schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
/home/alson/node_modules/elixir-jsonschema-validator/src/elixir-validator.js:111
customKeywordValidators.forEach(customKeywordValidator => {
^

TypeError: Cannot read property 'forEach' of undefined
at Function._addCustomKeywordValidators (/home/alson/node_modules/elixir-jsonschema-validator/src/elixir-validator.js:111:33)
at ElixirValidator.constructAjv (/home/alson/node_modules/elixir-jsonschema-validator/src/elixir-validator.js:105:25)
at new ElixirValidator (/home/alson/node_modules/elixir-jsonschema-validator/src/elixir-validator.js:22:33)
at Object. (/home/alson/Downloads/example.js:14:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

@ke4
Copy link
Collaborator

ke4 commented Nov 26, 2020

Hi Alan,

Sorry for the late reply.
I am going to have a look and try to address this issue as soon as possible.

Thanks for reporting it and have a nice day,

Karoly

@ke4
Copy link
Collaborator

ke4 commented Dec 7, 2020

Hi @alaninmcr,

Sorry again for the very late response.
After long consideration we decided that this current Elixir JSON schema repository should be only an npm library without the server feature/functionality.
We modified the README regarding this change.

The good news: we mentioned in the updated README that there is another GitHub repository already using this library as a dependency and it also contains a server feature. So you can use that as an example how to set up a JSON schema validator service yourself.
You can find this in our README here.

I hope this helps.

I am going to close this issue by the end of tomorrow, if there is no response till that time.

Kind regards,

Karoly

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

No branches or pull requests

2 participants