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

ReferenceError: _global is not defined #208

Closed
EvgenyOrekhov opened this issue Feb 8, 2018 · 2 comments
Closed

ReferenceError: _global is not defined #208

EvgenyOrekhov opened this issue Feb 8, 2018 · 2 comments

Comments

@EvgenyOrekhov
Copy link

The following Node.js example does not work: https://npm.runkit.com/html_codesniffer

@EvgenyOrekhov
Copy link
Author

I can see now in the README that HTML_CodeSniffer is supposed to be used with JSDom and is not supposed to be required using require("html_codesniffer").

That is confusing.

I would like the npm package to have a Node.js API, something like:

const HTMLCS = require("html_codesniffer");
HTMLCS.run({html: '<img src="test.png" />'}, function (err, result) {...});

@ironikart
Copy link
Contributor

I'll look into it for the next release. At this stage NPM is being used as an alternative way to fetch updates to the code for some organisations (#171).

dochne pushed a commit to silktide/HTML_CodeSniffer that referenced this issue Mar 8, 2021
…sed as a node module but will now present a more meaningful error. If the project has been built then it will require the build file. This resolves squizlabs#208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants