Clean install Win10 - can not get basic example to work (TypeError: iterable is not iterable) #724
Answered
by
kasperisager
BogdanCerovac
asked this question in
Questions
|
Hi, tried to run basic example with Scraper & Frontier but all I get out of it is that iterable is not iterable; Tried with versions 0.9.0, 0.10.0 and 0.11.0 - always same result. Clean installed them multiple times (node LTS and latest as well, with npm and with yarn), same result (Windows 10 64bit pro OS). Tried even to hack iterable a bit, returning empty array when it failed otherwise but then just got other errors. Example code copy pasted from site: import { Audit } from "@siteimprove/alfa-act";
import { Frontier } from "@siteimprove/alfa-frontier";
import { Crawler } from "@siteimprove/alfa-crawler";
import rules from "@siteimprove/alfa-rules";
const frontier = Frontier.of("http://example.com");
Crawler.with(async (crawler) => {
for await (const result of crawler.crawl(frontier)) {
for (const input of result) {
const outcomes = await Audit.of(input, rules).evaluate();
console.log(outcomes)
}
}
});Any ideas? |
Answered by
kasperisager
Feb 25, 2021
Replies: 1 comment 3 replies
|
Hi there and thanks for reaching out! My best guess as to what is causing this is that this... import rules from "@siteimprove/alfa-rules";...might be compiling to this... const rules = require("@siteimprove/alfa-rules");...which will cause errors like what you're seeing. Can you check if that's the case? |
3 replies
Answer selected by
BogdanCerovac
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there and thanks for reaching out! My best guess as to what is causing this is that this...
...might be compiling to this...
...which will cause errors like what you're seeing. Can you check if that's the case?