2013-03-06 7 views
11

Ich versuche, PhantomJS 1.8.1-3 auf Windows über npm zu installieren. Es scheint zu scheitern, egal was ich mache. Hier ist der Befehl bei ich laufe:Windows-Installation von PhantomJS schlägt fehl

npm install phantomjs 

Nach diesem Befehl ausgeführt wird, schlägt es mit den folgenden Fehlern:

> [email protected] install c:\johnprojects\tablet\htdocs\mini-app-sandbox\node_ 
modules\grunt-contrib-qunit\node_modules\grunt-lib-phantomjs\node_modules\phanto 
mjs 
> node install.js 

Requesting c:\johnprojects\tablet\htdocs\mini-app-sandbox\node_modules\grunt-con 
trib-qunit\node_modules\grunt-lib-phantomjs\node_modules\phantomjs\tmp\phantomjs 
-1.8.1-windows.zip 

events.js:71 
     throw arguments[1]; // Unhandled 'error' event 
        ^
Error: connect ECONNREFUSED 
    at errnoException (net.js:770:11) 
    at Object.afterConnect [as oncomplete] (net.js:761:19) 
npm ERR! [email protected] install: `node install.js` 
npm ERR! `cmd "/c" "node install.js"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the phantomjs package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node install.js 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls phantomjs 
npm ERR! There is likely additional logging output above. 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files 
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-contrib-quni 
t" "--save-dev" 
npm ERR! cwd c:\johnprojects\tablet\htdocs\mini-app-sandbox 
npm ERR! node -v v0.8.21 
npm ERR! npm -v 1.1.32 
npm ERR! code ELIFECYCLE 
npm ERR! message [email protected] install: `node install.js` 
npm ERR! message `cmd "/c" "node install.js"` failed with 1 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  c:\johnprojects\tablet\htdocs\mini-app-sandbox\npm-debug.log 
npm ERR! not ok code 0 
+0

Ich habe das gleiche Problem mit 1.8.2; das Herunterladen der Zip und das Extrahieren sagt mir, dass das crc für phantomjs.exe ungültig ist; das ist mein npm log: https://gist.github.com/ToJans/5169008 – Tom

+0

Mit der Version 1.9.7-6 ist noch ein weiterer möglicher Fehler 'Fehler beim Archivieren. Status: 403'. Die Problemumgehung ist die gleiche wie in der Antwort von @ashnazg beschrieben. – Saul

Antwort

1

PhantomJS ist noch nicht kompatibel mit Knoten 0,10. Sie müssen 0,08: https://github.com/yeoman/yeoman/issues/986

+0

Dies funktionierte nicht, auch wenn ich auf 0.08 war - das Upgrade war eine der Methoden, die ich versuchte, dieses Problem zu lösen. – user2140785

+0

es dauerte etwas Mühe für mich, eine gute Installation von 0,08 Arbeit zu bekommen. Ich denke, die Hauptsache ist, sicherzustellen, dass alle Probleme mit 'brauen Doktor' gelöst werden. – lambinator

2

Obwohl ich nicht herausfinden konnte, warum es geschieht, kann mich um diesen ECONNREFUSED Fehler arbeiten, von „npm installieren“ während der PhantomJS Zip-Datei Schritt nur die ZIP-Datei manuell herunterzuladen getrennt, indem Sie es in das tmp-Verzeichnis platzieren, in das der Download schreiben wollte.

+0

Dies ist die richtige Antwort. Irgendeine Art von Download-Problem. Vielen Dank! –

0

Ich lief bei der Installation von [email protected] (html-snapshots => same prob), wo [email protected] eine Abhängigkeit ist, in ein ähnliches Problem.

Ich habe nicht genau den gleichen Fehler obwohl. Wo hast du

Error: connect ECONNREFUSED 

Ich habe

Error: EPERM, operation not permitted 

Mein Problem eine Erlaubnis Problem behoben war, die „BohemMedia“ tun Kommentar können Sie auf Github finden HERE

Die anderen Ansätze nicht für mich arbeiten .

Ihr Problem ist eine abgewiesene Verbindung. Haben Sie versucht, Ihre Firewalls und andere Sicherheitsprogramme auszuschalten, die die Verbindung blockieren könnten?

+0

PS: [Dieser] (http://stackoverflow.com/questions/23823319/yeoman-generator-always-get-some-error?nah=1#28738433) Beitrag könnte auch von Interesse für Leute sein, die Probleme mit dem haben Phantomjs Installation –