Apricot icon indicating copy to clipboard operation
Apricot copied to clipboard

require jsdom and htmlparser not working

Open dsimard opened this issue 14 years ago • 8 comments

https://github.com/silentrob/Apricot/blob/0763f9bf166a11aa1540b60e7fb8b6c1d69cf776/lib/apricot.js#L10

var dom = require('jsdom-0.1.2/jsdom/level1/core').dom.level1.core;

should be

var dom = require('jsdom/jsdom/level1/core').dom.level1.core;

or

var dom = require('[email protected]/jsdom/level1/core').dom.level1.core;

dsimard avatar Dec 19 '10 21:12 dsimard

I'm also encountering this issue. Please make the recommended changes.

jrsinclair avatar Apr 05 '11 07:04 jrsinclair

Still an issue :(

mikl avatar May 06 '11 20:05 mikl

Agreed. Author should try to install this from npm and see if it works our of the box (hint: it doesn't).

krunkosaurus avatar May 07 '11 16:05 krunkosaurus

I've got the same issue. Did somebody find a clue ? Thanks.

ghost avatar May 10 '11 21:05 ghost

It's a simple enough fix...

line 6, in apricot.js:

var dom = require('jsdom').dom.level1.core,
     browser = require('jsdom/lib/jsdom/browser/index').windowAugmentation(dom);

Still would be nice if it worked in the npm version though...

DamonOehlman avatar May 19 '11 23:05 DamonOehlman

Why not use jsdom.env()?

indexzero avatar May 19 '11 23:05 indexzero

Just having a look at that now - wow :)

https://github.com/tmpvar/jsdom

DamonOehlman avatar May 20 '11 00:05 DamonOehlman

It looks like silentrob's pulled in a few commits recently, has anyone tried out the updated versions?

jrsinclair avatar Jun 19 '11 10:06 jrsinclair