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

Java error (on running for single file) #5

Open
bartvanderwal opened this issue Nov 21, 2018 · 2 comments
Open

Java error (on running for single file) #5

bartvanderwal opened this issue Nov 21, 2018 · 2 comments

Comments

@bartvanderwal
Copy link

I followed the README.md but getting an JAVA error when running

Details

So I did:
>npm install -g w3c-validator-cli

And then:
>w3c-validator index.html

It seems to connect to the W3C website but then throws an llegalArgumentException and something with JSON formatting:

Hope you can help me on this, cause this tool seems valuable to save me some time copy-pasting stuff myself :).

les-4$ w3c-validator index.html
  http:/// -undefined:1
Exception in thread "main" java.lang.IllegalArgumentException: protocol = http host = null
^

SyntaxError: Unexpected token E in JSON at position 0
    at JSON.parse (<anonymous>)
    at W3CValidator.<anonymous> (/Users/bartvanderwal/.npm-packages/lib/node_modules/w3c-validator-cli/lib/W3CValidator.js:95:25)
    at ChildProcess.exithandler (child_process.js:296:5)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:606:12)
les-4$ 
@bartvanderwal
Copy link
Author

bartvanderwal commented Nov 21, 2018

Ah it seems your tools works on actual URL's and not on static .html files. The restriction mentioned in another issue (#4) that you then also have to run on port 80 is not really realistic with my workflow. I'd suggested changing also allowing static .html files or non 80 ports.

For now I'll try and find another tool (html-validator-cli seems to do what I want).

@lgraubner
Copy link
Owner

To be honest I'm not using this anymore. Probably something changed on w3c's end. If you are willing to create a PR I'm happy to merge.

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