2014-09-11 62 views
0

更新:現在解決了 - 只需安裝node-legacy包。這也可以解決安裝npm模塊的問題,例如websocket,其中報告This failure might be due to the use of legacy binary "node"鮑爾 - 相同的涼亭版本,相同的bower.json,不適用於不同的機器(差異nodejs版本)

我正在按照程序從github安裝一個應用程序。我可以在我的機器上運行它,但不能在VPS上運行,使用相同的命令。

第一步,下載回購,工作在兩臺機器上:

git clone git://github.com/jsonchess/lightsquare.git

的下一步是cd進入下載回購和做bower install得到的依賴關係:

cd lightsquare - 兩臺機器的效果顯然相同。

只是可以肯定比我在這一點上bower.json文件:

md5sum bower.json 
edea21a5e088824a11f039c4694fa230 bower.json 

md5sum bower.json 
edea21a5e088824a11f039c4694fa230 bower.json 

bower install的作品在我的機器上的罰款:

$ bower install 
bower websocket-client#* not-cached git://github.com/gushogg-blake/websocket-client.git#* 
bower websocket-client#*  resolve git://github.com/gushogg-blake/websocket-client.git#* 

... some output omitted for clarity ... 
... no errors ... 

jsonchess#78f1b23027 bower_components/jsonchess 

chess#a5729e7d8a bower_components/chess 

但在VPS bower install輸出什麼(直背到提示),如同bower --version

$ bower install 
$ bower --version 

$ bower --version在我的機器上輸出1.3.9

所以比較,我跑的命令,我的機器上:

[email protected] lightsquare$ which bower 
/usr/local/bin/bower 
[email protected] lightsquare$ md5sum /usr/local/bin/bower 
018425bfa8540b0e2a3dd55480db1cf6 /usr/local/bin/bower 
[email protected] lightsquare$ 

...並在VPS:

[email protected]:~/projects/lightsquare$ which bower 
/usr/local/bin/bower 
[email protected]:~/projects/lightsquare$ md5sum /usr/local/bin/bower 
018425bfa8540b0e2a3dd55480db1cf6 /usr/local/bin/bower 
[email protected]:~/projects/lightsquare$ 

顯然涼亭命令是在兩臺機器上相同,它是一個NodeJS程序,所以我唯一能想到的是NodeJS版本中的一些差異。我的機器正在運行v0.10.15,VPS正在運行v0.10.25。儘管如此,我仍然期待某種錯誤,而不是任何涼亭命令中的沉默。任何想法可能是什麼?

回答

0

安裝node-legacy軟件包(提供了node命令)解決了這個問題。我相信另一種解決方案是將符號鏈接/usr/bin/node改爲/usr/bin/nodejs

相關問題