marcelduran / yslow

YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.
yslow.org
BSD 3-Clause "New" or "Revised" License
2.21k stars 384 forks source link

yslow completely broken - yslow --help fails on fresh install #183

Open davidfavor opened 7 years ago

davidfavor commented 7 years ago
net10 # npm install yslow -g
/usr/local/bin/yslow -> /usr/local/lib/node_modules/yslow/bin/yslow
/usr/local/lib
`-- yslow@3.1.0

net10 # which yslow
/usr/local/bin/yslow

net10 # yslow --help
/usr/local/lib/node_modules/yslow/node_modules/jsdom/lib/api.js:10
const { URL } = require("whatwg-url");
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/yslow/bin/yslow:16:11)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

net10 # npm install whatwg-url -g
/usr/local/lib
`-- whatwg-url@4.7.1 
  +-- tr46@0.0.3 
  `-- webidl-conversions@3.0.1 

Runtime environment...

net10 # node --version
v4.7.2

net10 # npm --version
3.5.2

net10 # uname -a
Linux net10.bizcooker.com 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

net10 # lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty

net10 # apt-get -yqq upgrade
net10 # (nothing reported, so all updates installed)
sakonachhoeurng commented 7 years ago

I also error the same you as well. when run yslow --help

/usr/local/lib/node_modules/yslow/bin/yslow:16
    doc = require('jsdom').jsdom(),
                           ^

TypeError: require(...).jsdom is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/yslow/bin/yslow:16:28)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3
davidfavor commented 7 years ago

This problem occurs doing a fresh install, following installation instructions.

Be great if someone can answer this ticket with a fix or work around.

Thanks.

davidfavor commented 7 years ago

@sakonachhoeurng, likely the following will fix your JSON error.

npm install json -g

sakonachhoeurng commented 7 years ago

@davidfavor I still got that error the same.

davidfavor commented 7 years ago

Error still persists.

Be great if someone can provide suggestions towards a fix.

davidfavor commented 7 years ago

@sakonachhoeurng - Likely best to open another issue for this, as your problems seems different from this ticket.

Be sure to post all relevant runtime environment detail in your new ticket.

Refer to top of this ticket for generating runtime environment detail, in your new ticket.

davidfavor commented 7 years ago

Problem still persists.

zengxiaohou commented 6 years ago

@sakonachhoeurng , jsDom version change to the oldest version.

calebolin commented 6 years ago

I'm having this issue too. Has this project been abandoned?

davidfavor commented 6 years ago

This project seems dead.

Many issues have no developer response.

Pink Floyd plays... "Is anybody out there?"