YSLOW no longer works on Node (jsdom only supports io.js now) #154

Open
Droogans opened this Issue Apr 20, 2015 · 0 comments

Projects

None yet

1 participant

@Droogans
$: ./node_modules/.bin/yslow ~/Desktop/hardata.json 

~/project/node_modules/yslow/node_modules/jsdom/lib/jsdom.js:55
    throw new RangeError(`Invalid parsingMode option ${JSON.stringify(options.
                         ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (~/project/node_modules/yslow/bin/yslow:16:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Fixing that brings up another error.

~/project/node_modules/yslow/node_modules/jsdom/lib/jsdom/level2/html.js:238
var nonInheritedTags = new Set([
                           ^
ReferenceError: Set is not defined
    at Object.<anonymous> (~/project/node_modules/yslow/node_modules/jsdom/lib/jsdom/level2/html.js:238:28)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (~/project/node_modules/yslow/node_modules/jsdom/lib/jsdom/living/index.js:8:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

I'm using version 3.1.0, which lists a dependency of "jsdom": ">=0.2.10". That may be too permissive since jsdom's current version in my yslow's node_modules directory is set at 5.0.1!

Perhaps an explicit pin to the last 3.x release for jsdom would be the best way to fix this?

@Droogans Droogans added a commit to Droogans/yslow that referenced this issue Apr 20, 2015
@Droogans Droogans fix(npm): Pin to last node-usable version of jsdom
Closes #154
64af745
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment