Skip to content

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

@Droogans

Description

@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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions