yslow icon indicating copy to clipboard operation
yslow copied to clipboard

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

Open davidfavor opened this issue 7 years ago • 10 comments

net10 # npm install yslow -g
/usr/local/bin/yslow -> /usr/local/lib/node_modules/yslow/bin/yslow
/usr/local/lib
`-- [email protected]

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
`-- [email protected] 
  +-- [email protected] 
  `-- [email protected] 

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)

davidfavor avatar May 04 '17 13:05 davidfavor

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

sakonachhoeurng avatar May 22 '17 04:05 sakonachhoeurng

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 avatar May 22 '17 14:05 davidfavor

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

npm install json -g

davidfavor avatar May 22 '17 14:05 davidfavor

@davidfavor I still got that error the same.

sakonachhoeurng avatar May 23 '17 01:05 sakonachhoeurng

Error still persists.

Be great if someone can provide suggestions towards a fix.

davidfavor avatar May 25 '17 16:05 davidfavor

@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 avatar May 25 '17 16:05 davidfavor

Problem still persists.

davidfavor avatar Jul 02 '17 23:07 davidfavor

@sakonachhoeurng , jsDom version change to the oldest version.

zengxiaohou avatar Aug 10 '17 00:08 zengxiaohou

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

calebolin avatar Aug 11 '17 00:08 calebolin

This project seems dead.

Many issues have no developer response.

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

davidfavor avatar Aug 12 '17 15:08 davidfavor