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

iojs hanging on npm install with phantomjs #1236

Closed
gtarcea opened this issue Mar 22, 2015 · 9 comments
Closed

iojs hanging on npm install with phantomjs #1236

gtarcea opened this issue Mar 22, 2015 · 9 comments

Comments

@gtarcea
Copy link

gtarcea commented Mar 22, 2015

Hi all,
The package.json file below hangs iojs when doing an npm install. I've tested this across versions 1.5.0, 1.5.1 and 1.6.1. I've also tried npm versions 2.7.0 and 2.7.1. It works with node v0.12.0. This occurs on a Linux fedora box and Mac (yosemite). The output from npm where it hangs is always at the phantomjs install:

=============== start npm output =================================
spelljammer:~/t/longshoreapp$> npm install
npm WARN package.json longshoreapp@0.0.0 No repository field.

ws@0.5.0 install /Users/gtarcea/t/longshoreapp/node_modules/socket.io/node_modules/engine.io/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished

phantomjs@1.9.9 install /Users/gtarcea/t/longshoreapp/node_modules/phantomjs
node install.js

Looks like an npm install -g; unable to check for already installed version.
Download already available at /var/folders/80/xlwcdgms42nfs4t1j4r83km00000gn/T/phantomjs/phantomjs-1.9.7-macosx.zip
Extracting zip contents
Copying extracted folder /var/folders/80/xlwcdgms42nfs4t1j4r83km00000gn/T/phantomjs/phantomjs-1.9.7-macosx.zip-extract-1427025859423/phantomjs-1.9.7-macosx -> /Users/gtarcea/t/longshoreapp/node_modules/phantomjs/lib/phantom
================ end npm output ==========================

The package.json file is as follows:

========= start package.json ==========
{
"name": "longshoreapp",
"description": "",
"version": "0.0.0",
"scripts": {
"init": "npm install",
"install": "bower install",
"start": "node --harmony src/server/app.js",
"test": "gulp test"
},
"dependencies": {
},
"devDependencies": {
"phantomjs": "1.9.9"
}
}
========= end package.json ==========

If there is anything I should do or try please let me know.

@kenany
Copy link
Contributor

kenany commented Mar 22, 2015

It looks like I can reproduce this (with npm install phantomjs@1.9.9), but I'm not sure who is at fault here. It's hanging at phantomjs's postinstall script, so I question if it's npm's fault. npm install phantomjs@1.9.16 works just fine so perhaps it's an issue with certain versions of phantomjs.

@Fishrock123
Copy link
Contributor

You mean with npm @ 2.7.0 and node @ 0.12, right?

cc @othiym23?

@gtarcea
Copy link
Author

gtarcea commented Mar 22, 2015

I went through a number of steps. I know I upgraded NPM to 2.7.1 for 1.5.1, and I believe I did the same for Node 0.12.0.

FYI from my perspective using later versions of phantomjs are just fine. I brought this issue up because the install works on Node and not on iojs.

@kenany
Copy link
Contributor

kenany commented Mar 22, 2015

The changelogs for both phantomjs@1.9.14 and phantomjs@1.9.15 have the line: "Adds support for io.js", which further convinces me that this used to be an issue with phantomjs itself.

@yosuke-furukawa
Copy link
Member

@gtarcea
I tried, but I can not reproduce the issue on my yosemite. iojs version is v1.5.0. npm install is fine.
my package.json is here.

{
  "name": "tests",
  "version": "0.0.1",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "MIT",
  "dependencies": {
    "socket.io": "1.0",
    "phantomjs": "1.9.9"
  }
}

i agree with @kenany. phantomjs supports iojs on v1.9.15.
you should try to upgrade phantomjs v1.9.15.

@kenany
Copy link
Contributor

kenany commented Mar 23, 2015

Relevant: Medium/phantomjs#275. Issue seems to have been ncp, a dependency of phantomjs doing version sniffing and detecting io.js as "not modern" AvianFlu/ncp#79

@Fishrock123 Fishrock123 changed the title iojs hanging using npm iojs hanging on npm install with phantomjs Mar 23, 2015
@silverwind
Copy link
Contributor

Ah so it was that bug again. @gtarcea please report back if above phantomjs version worked.

@gtarcea
Copy link
Author

gtarcea commented Mar 24, 2015

Upgrading to the lastest phantomjs resolved the issue. I tried it on both mac and linux (fedora).

Thanks everyone!

@megastef
Copy link

I had a similar issue only on 1.6.2 (1.5 was fine) - but not using phantomjs. npm (2.7.1) worked again after removing all global modules. Too bad that I did not make a copy of the package list - discovered this issue too late.

rmorrise added a commit to rmorrise/hottowel-angular-typescript that referenced this issue May 18, 2016
This update fixes an issue which causes npm install to hang while extracting and copying phantomjs.
See:
johnpapa#20
nodejs/node#1236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants