因此,我嘗試在工作時安裝phantom.js。我可以下載它的源代碼,甚至爲它安裝.exe(所以我可以訪問幻像外殼)。但它仍然沒有安裝。當我嘗試節點./install .js或npm install phantom.js時,出現此錯誤。無法在Windows上使用npm安裝Phantomjs
connect ETIMEDOUT ip:port
This is most likely not a problem with npm itself
and is related to network connectivity.
In most cases you are behind a proxy or have bad network settings.
If you are behind a proxy, please make sure that the
'proxy' config is set properly. See: 'npm help config'
或
Receiving...
Error making request.
Error: connect ETIMEDOUT ipaddress:port
at Object.exports._errnoException (util.js:860:11)
at exports._exceptionWithHostPort (util.js:883:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
我的節點版本是v4.4.2,我在Windows 7
我試圖編輯我.npmrc文件(其中包含我代理一個信息),所以它現在有線 phantomjs_cdnurl = https://cnpmjs.org/downloads
我也試過把bot的.exe文件添加到我的PATH和源代碼中,仍然沒有運氣。最後,我已經嘗試了README建議的操作,比如「npm install phantomjs-prebuilt --phantomjs_cdnurl = 」等shell命令,但也具有相同的錯誤。有什麼我失蹤/做錯了嗎?幫助將非常感謝。
'嘗試添加.exe文件到我的PATH'也就是說需要什麼。描述你是如何做到的。 – Vaviloff
我找到了我的PATH,然後只是將源代碼和.exe複製到它。然後再次安裝npm。 –
您是否試圖在虛擬機或實際機器上安裝?如果您在虛擬機上,請檢查您的網絡連接。你在線嗎?請注意,錯誤表示由於網絡連接問題導致超時。 –