-
Notifications
You must be signed in to change notification settings - Fork 435
Zip extraction not moved to expected location #38
Comments
We've just hit this issue on CI builds which do a fresh NPM install since last night. The task no longer picks up the correct path to the phantomjs binary. Rolling back to 1.8.2-0 works fine. I can see the install is different: It seems that a runtime the path is never resolve to phantomjs/bin and always phantomjs/lib/bin hence it fails. This is causing problems for anything which doesn't depend on exact versions of phantomjs, so anyone using grunt-lib-phantomjs is hit because that uses:
Which from the NPM repo means anyone using the following and doing an npm install will be hit: grunt-barista, grunt-contrib-jasmine, grunt-contrib-qunit, grunt-mocha, grunt-mocha-phantom-hack, grunt-qunit-serverless, grunt-sencha-dependencies |
Looking into this now. On Wed, Mar 20, 2013 at 7:24 AM, Matt Goldspink notifications@github.comwrote:
|
What OS are you using and version of node? If I do the following, it points at the right binary: npm install phantomjs On Wed, Mar 20, 2013 at 9:07 AM, Dan Pupius dan@obvious.com wrote:
|
I am also having this issue and i am using OS X $node -e 'console.log(require("phantomjs").path)' | xargs ls is the output of your command you requested for me |
What node version. Can you see if On Wed, Mar 20, 2013 at 9:24 AM, Cris Favero notifications@github.comwrote:
|
v0.8.14 and i just pulled it directly from github master when i did this test |
im using OS X 10.8.2 ❯ node --version
v0.8.20
❯ phantomjs --version
1.8.2 your code sample throw an error ❯ node -e 'console.log(require("phantomjs").path)' | xargs ls ✹ ✭
module.js:340
throw err;
^
Error: Cannot find module 'phantomjs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at [eval]:1:13
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:449:26)
at evalScript (node.js:282:25)
at startup (node.js:76:7)
at node.js:627:3 but actually its installed in |
@marioatlp : Ok, let me switch back to 0.8.14. It's quite possible that soem of the dependencies no longer work with older versions of node. Could I suggest moving to 0.8.22 at least, we started using it in production this week and things look ok. @CTAPbIuMABP : You need to |
yes i can try changing to 0.8.22. I will say that it did download the zip file and extract the binary into tmp directory just fine. if its suppose to move it after that, that part must not have occured |
❯ node -e 'console.log(require("phantomjs").path)' | xargs ls
/Users/user_name/projects/project_name/node_modules/phantomjs/lib/phantomjs/bin/phantomjs |
Confirmed it doesn't work in 0.8.14, it looks like we're not getting any of the events from the zipstream. Can I suggest you either peg to an old version of the library or upgrade to |
Could be related to EvanOxfeld/node-unzip#21 |
after discussing with my fellow developers here we can't switch to an older version so i will just use a slightly older version of this that doesn't have this issue. 1.8.2-0 workes fine |
Thanks for looking into it. We've rolled back to 1.8.2-0 as well which is suitable workaround for us. I'm on: OSX 10.8.2 |
Please try latest version. |
…new developers do not have to manually install phantom to get npm test to work. Changes Include: * package.json Added a dev dependency to phantoms v1.8.2-0. This version was explicitly chosen because of a bug that occurs during the install process for phantomjs where the unzipped binary does not get moved to the right location. For more information on this bug, you can see it here: Medium/phantomjs#38 * test/testconfigs.json Changed the "phantom" command to not rely on phantomjs to be on the PATH, it will instead reference the phantomjs that gets installed into node_modules by npm.
shouldn't it be same dir name in this 3 lines ?
https://github.com/Obvious/phantomjs/blob/master/install.js#L21
https://github.com/Obvious/phantomjs/blob/master/lib/phantomjs.js#L2
https://github.com/Obvious/phantomjs/blob/master/bin/phantomjs#L6
The text was updated successfully, but these errors were encountered: