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

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

Open
Droogans opened this issue Apr 20, 2015 · 0 comments · May be fixed by #155
Open

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

Droogans opened this issue Apr 20, 2015 · 0 comments · May be fixed by #155

Comments

@Droogans
Copy link

$: ./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 linked a pull request Apr 20, 2015 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant