Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 436 forks source link

Failed at the phantomjs-prebuilt@2.1.13 install script 'node install.js'. #629

Closed akolybelnikov closed 7 years ago

akolybelnikov commented 8 years ago

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save" "critical" npm ERR! node v4.4.4 npm ERR! npm v2.15.1 npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.13 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.13 install script 'node install.js'. npm ERR! This is most likely a problem with the phantomjs-prebuilt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js

ghost commented 7 years ago

I have this bug too.

npm-debug.log says that it happens because of unusual name of the node executable file on some platforms: nodejs, node.exe, etc.

My case: Debian, nodejs.

The error is happened because this project executes node directly (see https://github.com/Medium/phantomjs/blob/master/package.json#L38).

nicks commented 7 years ago

please read the FAQ https://github.com/Medium/phantomjs#im-on-debian-or-ubuntu-and-the-installer-failed-because-it-couldnt-find-node

ghost commented 7 years ago

@nicks, this is good, but what about Windows? This issue is about it.

trip-somers commented 7 years ago

I am on Ubuntu 16.04 with nodejs-legacy installed (node -v returns 'v4.2.6' same as nodejs -v), and I am still getting this error.

trip-somers commented 7 years ago

Forcing nodejs v6.9.1 (and npm 3.10.8) fixed my problem. I didn't expect 16.04's official packages to be that far behind.

bumbapartha commented 7 years ago

I think still the issue is not closed. Still now I am getting the following error when I run npm install on the following package.json

{
  "name": "app",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "clean": "rimraf node_modules doc dist && npm cache clean",
    "clean-install": "npm run clean && npm install",
    "clean-start": "npm run clean-install && npm start",
    "watch": "webpack --watch --progress --profile",
    "build": "rimraf dist && webpack --progress --profile --bail",
    "server": "webpack-dashboard -- webpack-dev-server --inline --port 8080",
    "webdriver-update": "webdriver-manager update",
    "webdriver-start": "webdriver-manager start",
    "lint": "tslint --force \"src/**/*.ts\"",
    "e2e": "protractor",
    "e2e-live": "protractor --elementExplorer",
    "pretest": "npm run lint",
    "test": "karma start",
    "posttest": "remap-istanbul -i coverage/json/coverage-final.json -o coverage/html -t html",
    "test-watch": "karma start --no-single-run --auto-watch",
    "ci": "npm run e2e && npm run test",
    "docs": "typedoc --options typedoc.json src/app/app.component.ts",
    "start": "npm run server",
    "start:hmr": "npm run server -- --hot",
    "postinstall": "npm run webdriver-update"
  },
  "dependencies": {
    "@angular/common": "2.2.0",
    "@angular/compiler": "2.2.0",
    "@angular/core": "2.2.0",
    "@angular/forms": "2.2.0",
    "@angular/http": "2.2.0",
    "@angular/platform-browser": "2.2.0",
    "@angular/platform-browser-dynamic": "2.2.0",
    "@angular/router": "3.2.0",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "^0.6.25"
  },
  "devDependencies": {
    "@angularclass/hmr": "^1.0.1",
    "@angularclass/hmr-loader": "^3.0.2",
    "@types/core-js": "^0.9.0",
    "@types/jasmine": "^2.2.29",
    "@types/node": "^6.0.38",
    "@types/selenium-webdriver": "2.53.33",
    "angular2-template-loader": "^0.6.0",
    "autoprefixer": "^6.3.2",
    "awesome-typescript-loader": "^2.2.4",
    "codelyzer": "1.0.0-beta.3",
    "copy-webpack-plugin": "^4.0.0",
    "css-loader": "^0.25.0",
    "extract-text-webpack-plugin": "^2.0.0-beta.4",
    "file-loader": "^0.9.0",
    "html-loader": "^0.4.0",
    "html-webpack-plugin": "^2.8.1",
    "istanbul-instrumenter-loader": "^0.2.0",
    "jasmine-core": "^2.3.4",
    "jasmine-spec-reporter": "^2.4.0",
    "json-loader": "^0.5.3",
    "karma": "1.3.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage": "^1.0.0",
    "karma-jasmine": "^1.0.2",
    "karma-mocha-reporter": "^2.0.3",
    "karma-phantomjs-launcher": "^1.0.0",
    "karma-remap-istanbul": "0.2.1",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "1.8.0",
    "node-sass": "^3.4.2",
    "null-loader": "0.1.1",
    "phantomjs-prebuilt": "^2.1.13",
    "postcss-loader": "^1.1.0",
    "protractor": "^4.0.10",
    "raw-loader": "0.5.1",
    "remap-istanbul": "^0.6.4",
    "rimraf": "^2.5.1",
    "sass-loader": "^4.0.0",
    "shelljs": "^0.7.0",
    "style-loader": "^0.13.0",
    "ts-helpers": "^1.1.1",
    "tslint": "^3.4.0",
    "tslint-loader": "^2.1.0",
    "typedoc": "^0.5.1",
    "typescript": "2.0.6",
    "url-loader": "^0.5.6",
    "webpack": "^2.1.0-beta.25",
    "webpack-dashboard": "^0.2.0",
    "webpack-dev-server": "2.1.0-beta.9"
  }
}

error_log.txt

johannesjo commented 7 years ago

I'm getting the same error with v5.9.1 on Ubuntu 16.04.

bmcminn commented 7 years ago
OS:   Win7 64bit Enterprise 
Node: 7.2.0 
NPM:  3.10.9

This same error is happening on one of our devs machines and in our staging environment, but not on others local machines.

Gerk commented 7 years ago
npm ERR! Linux 3.10.0-327.36.3.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

CentOS 7 with all latest yum updates.

akolybelnikov commented 6 years ago

We've been running into this issue with our prod build on the server. Node.js versions are the same both locally and on the server (=6.11.3), however a fresh git pull && npm install somehow fails only in the cloud. We have been able to work around like so: npm install phantomjs-prebuilt@2.1.13 --ignore-scripts

Here is the solution on stackoverflow related to #649