-
Notifications
You must be signed in to change notification settings - Fork 174
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
Uncss failing at source #74
Comments
I'm going to wait until uncss 0.8 lands on npm so we can upgrade and then double-check this issue is still present. |
Can you re-check with the latest version? 0.3 is now on npm. |
This still occurs within the newest version just the error message has changed to Fatal error: bad argument I am running it off of Windows 7 32bit if that helps in identifying why the module would fail in such a manner. |
@giakki are you seeing any similar reports upstream? |
Yes, same error running the command in node.
Windows 8.1 64 bit. |
Running grunt with debug and stack trace on
gives
So, I head over to PhantomJS Website downloaded the newest version, put the executable in a directory in path and the gruntfile runs, thanks for the awesome plugin. |
@bondz I relatively new to the grunt scene but where exactly did you place this exe file for the plugin to run? I have tried multiple places with no success. |
@ArcaneMainFrame I took the following steps.
|
This did not solve it, but I figured it out on my own and it was the most unlikely of things. I had changed the default path of command line when it opens to C:\ instead of C:\Users\Username in the regedit with an autorun command. This caused PhantomJS to look into the work places for dependencies. Changing it back to the default fixed the issue. |
Hello, I have the same error as above and the same result with grunt -d --stack. |
@juliencap yes. Then reinstall grunt-uncss. You should see something along the lines of phantomjs already installed. Rewriting path to x:\nodejs\phantomjs.exe |
Thanks for your help, but no progress. Edit : latest report: C:\wamp\www\test>grunt -d --stack Running "copy:dist" (copy) task Running "uncss:dist" (uncss) task Execution Time (2014-04-16 19:33:11 UTC) |
Copy phantomjs to node path. Run Check that module.exports.location = "P:\\ath\\to\\PhantomJS\\phantomjs.EXE" |
Stil me, I tried your last advices, so delete and run again the install seems ok. The fact is on : C:\wamp\www\test\node_modules\test\ (And when I run grunt I still have the same error as above) Actually on C:\wamp\www\test\node_modules\grunt-uncss I don't have node_modules directory only :
and i Have phantomjs.exe on : C:\Program Files\nodejs So I am probably on total confusion with differents installations ! |
Actually, in my node_modules folder, I don't have uncss... The only folder there is grunt-uncss. So, I don't know exactly what might be happening on your machine. I do have uncss in grunt-uncss\node_modules though. So, maybe try removing the uncss folder from C:\wamp\www\test\node_modules. Also, might be irrelevant but I don't have node installed in program files, its in a directory without spaces. X:\node\ You can try that after. |
Ok close to the perfection. Pretty sure my phantomjs on node directory is not executed because my version is 1.9.7.0 (on node directory) and when I run npm install uncss I have at the end of the install that message :
But I still not find that location.js file's. I installed other grunt modules to test and it was ok. Thanks again for your time. |
I'm having the same issue on mountain lion TypeError: Bad argument I tried placing the phantom binary in the same directory of the Gruntfile but it didn't work too. |
Solved it by editing the location.js file in /grunt-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs/lib/location.js |
@seminice 👍 Thanks your tip is nice. I just encountered same problem with global phantomjs installation. If you have idea how to reproduce that please tell or open new bug report in https://github.com/ariya/phantomjs/ |
This appears to be due to a half-completed installation of phantomjs-prebuilt, see this other issue for more info: Medium/phantomjs#533 In my case, following these instructions fixed it for me:
|
I followed @mikelambert instructions and this fixed the issue for me too. For some reason, the PhantomJS install never fully completed on MacOS and needed this nudge to complete it...saved me hours of frustration! |
Not sure what I am doing wrong with my grunt configuration. I do have this set locally and I have tried setting the htmlroot and stylesheets but it keeps giving this error with no idea as to why it fails:
This is my gruntfile task:
The text was updated successfully, but these errors were encountered: