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

analyze-css runScript path invalid #672

Closed
xiaoping0x opened this issue Nov 23, 2016 · 0 comments
Closed

analyze-css runScript path invalid #672

xiaoping0x opened this issue Nov 23, 2016 · 0 comments

Comments

@xiaoping0x
Copy link

xiaoping0x commented Nov 23, 2016

Bugs on Windows.

Error logs:

03:56:57.992 runScript: running D:/Tools/YLT/node_modules/phantomas/d:\Tools\YLT\node_modules\phantomas\node_modules\ana
lyze-css/bin/analyze-css.js
D:/Tools/YLT/node_modules/phantomas/d:\Tools\YLT\node_modules\phantomas\node_modules\analyze-css/bin/analyze-css.js
{"event":"log","data":["03:56:57.997 \u001b[91m\u001b[1mrunScript: failed running D:/Tools/YLT/node_modules/phantomas/d:
\\Tools\\YLT\\node_modules\\phantomas\\node_modules\\analyze-css/bin/analyze-css.js --url http://localhost:3000/styleshe
ets/style.css --json!\u001b[22m\u001b[39m"]}
phantomas: (3221225477) Failed to parse JSON with the results

It is a windows incompatible bug, I have fixed by change this line:

https://github.com/macbre/phantomas/blob/devel/core/phantomas.js#L862

if (!fs.isAbsolute(script)) {
// if (script.indexOf('/') !== 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants